home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / MPWGCC (Sources).cpt / Sources / reload1.c < prev    next >
MacBinary  |  1990-09-04  |  107.6 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Sep 4 14:17:17 1990, modified Tue Sep 4 14:17:17 1990, creator 'MPS ', type ASCII, 109564 bytes "reload1.c" , at 0x1ac7c 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 72 65 6c 6f 61 64 | 31 2e 63 00 00 00 00 00 |..reload|1.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 01 ab fc 00 | 00 01 ac a3 09 a0 2d a3 |........|......-.|
|00000060| 09 a0 2d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..-.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7a b7 00 00 |........|....z...|
|00000080| 2f 2a 20 52 65 6c 6f 61 | 64 20 70 73 65 75 64 6f |/* Reloa|d pseudo|
|00000090| 20 72 65 67 73 20 69 6e | 74 6f 20 68 61 72 64 20 | regs in|to hard |
|000000a0| 72 65 67 73 20 66 6f 72 | 20 69 6e 73 6e 73 20 74 |regs for| insns t|
|000000b0| 68 61 74 20 72 65 71 75 | 69 72 65 20 68 61 72 64 |hat requ|ire hard|
|000000c0| 20 72 65 67 73 2e 0d 20 | 20 20 43 6f 70 79 72 69 | regs.. | Copyri|
|000000d0| 67 68 74 20 28 43 29 20 | 31 39 38 37 2c 20 31 39 |ght (C) |1987, 19|
|000000e0| 38 38 2c 20 31 39 38 39 | 20 46 72 65 65 20 53 6f |88, 1989| Free So|
|000000f0| 66 74 77 61 72 65 20 46 | 6f 75 6e 64 61 74 69 6f |ftware F|oundatio|
|00000100| 6e 2c 20 49 6e 63 2e 0d | 0d 54 68 69 73 20 66 69 |n, Inc..|.This fi|
|00000110| 6c 65 20 69 73 20 70 61 | 72 74 20 6f 66 20 47 4e |le is pa|rt of GN|
|00000120| 55 20 43 43 2e 0d 0d 47 | 4e 55 20 43 43 20 69 73 |U CC...G|NU CC is|
|00000130| 20 66 72 65 65 20 73 6f | 66 74 77 61 72 65 3b 20 | free so|ftware; |
|00000140| 79 6f 75 20 63 61 6e 20 | 72 65 64 69 73 74 72 69 |you can |redistri|
|00000150| 62 75 74 65 20 69 74 20 | 61 6e 64 2f 6f 72 20 6d |bute it |and/or m|
|00000160| 6f 64 69 66 79 0d 69 74 | 20 75 6e 64 65 72 20 74 |odify.it| under t|
|00000170| 68 65 20 74 65 72 6d 73 | 20 6f 66 20 74 68 65 20 |he terms| of the |
|00000180| 47 4e 55 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |GNU Gene|ral Publ|
|00000190| 69 63 20 4c 69 63 65 6e | 73 65 20 61 73 20 70 75 |ic Licen|se as pu|
|000001a0| 62 6c 69 73 68 65 64 20 | 62 79 0d 74 68 65 20 46 |blished |by.the F|
|000001b0| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|000001c0| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|000001d0| 76 65 72 73 69 6f 6e 20 | 31 2c 20 6f 72 20 28 61 |version |1, or (a|
|000001e0| 74 20 79 6f 75 72 20 6f | 70 74 69 6f 6e 29 0d 61 |t your o|ption).a|
|000001f0| 6e 79 20 6c 61 74 65 72 | 20 76 65 72 73 69 6f 6e |ny later| version|
|00000200| 2e 0d 0d 47 4e 55 20 43 | 43 20 69 73 20 64 69 73 |...GNU C|C is dis|
|00000210| 74 72 69 62 75 74 65 64 | 20 69 6e 20 74 68 65 20 |tributed| in the |
|00000220| 68 6f 70 65 20 74 68 61 | 74 20 69 74 20 77 69 6c |hope tha|t it wil|
|00000230| 6c 20 62 65 20 75 73 65 | 66 75 6c 2c 0d 62 75 74 |l be use|ful,.but|
|00000240| 20 57 49 54 48 4f 55 54 | 20 41 4e 59 20 57 41 52 | WITHOUT| ANY WAR|
|00000250| 52 41 4e 54 59 3b 20 77 | 69 74 68 6f 75 74 20 65 |RANTY; w|ithout e|
|00000260| 76 65 6e 20 74 68 65 20 | 69 6d 70 6c 69 65 64 20 |ven the |implied |
|00000270| 77 61 72 72 61 6e 74 79 | 20 6f 66 0d 4d 45 52 43 |warranty| of.MERC|
|00000280| 48 41 4e 54 41 42 49 4c | 49 54 59 20 6f 72 20 46 |HANTABIL|ITY or F|
|00000290| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|000002a0| 54 49 43 55 4c 41 52 20 | 50 55 52 50 4f 53 45 2e |TICULAR |PURPOSE.|
|000002b0| 20 20 53 65 65 20 74 68 | 65 0d 47 4e 55 20 47 65 | See th|e.GNU Ge|
|000002c0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|000002d0| 65 6e 73 65 20 66 6f 72 | 20 6d 6f 72 65 20 64 65 |ense for| more de|
|000002e0| 74 61 69 6c 73 2e 0d 0d | 59 6f 75 20 73 68 6f 75 |tails...|You shou|
|000002f0| 6c 64 20 68 61 76 65 20 | 72 65 63 65 69 76 65 64 |ld have |received|
|00000300| 20 61 20 63 6f 70 79 20 | 6f 66 20 74 68 65 20 47 | a copy |of the G|
|00000310| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00000320| 63 20 4c 69 63 65 6e 73 | 65 0d 61 6c 6f 6e 67 20 |c Licens|e.along |
|00000330| 77 69 74 68 20 47 4e 55 | 20 43 43 3b 20 73 65 65 |with GNU| CC; see|
|00000340| 20 74 68 65 20 66 69 6c | 65 20 43 4f 50 59 49 4e | the fil|e COPYIN|
|00000350| 47 2e 20 20 49 66 20 6e | 6f 74 2c 20 77 72 69 74 |G. If n|ot, writ|
|00000360| 65 20 74 6f 0d 74 68 65 | 20 46 72 65 65 20 53 6f |e to.the| Free So|
|00000370| 66 74 77 61 72 65 20 46 | 6f 75 6e 64 61 74 69 6f |ftware F|oundatio|
|00000380| 6e 2c 20 36 37 35 20 4d | 61 73 73 20 41 76 65 2c |n, 675 M|ass Ave,|
|00000390| 20 43 61 6d 62 72 69 64 | 67 65 2c 20 4d 41 20 30 | Cambrid|ge, MA 0|
|000003a0| 32 31 33 39 2c 20 55 53 | 41 2e 20 20 2a 2f 0d 0d |2139, US|A. */..|
|000003b0| 0d 23 69 6e 63 6c 75 64 | 65 20 22 63 6f 6e 66 69 |.#includ|e "confi|
|000003c0| 67 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 72 |g.h".#in|clude "r|
|000003d0| 74 6c 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |tl.h".#i|nclude "|
|000003e0| 69 6e 73 6e 2d 63 6f 6e | 66 69 67 2e 68 22 0d 23 |insn-con|fig.h".#|
|000003f0| 69 6e 63 6c 75 64 65 20 | 22 66 6c 61 67 73 2e 68 |include |"flags.h|
|00000400| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 72 65 67 73 |".#inclu|de "regs|
|00000410| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 68 61 |.h".#inc|lude "ha|
|00000420| 72 64 2d 72 65 67 2d 73 | 65 74 2e 68 22 0d 23 69 |rd-reg-s|et.h".#i|
|00000430| 6e 63 6c 75 64 65 20 22 | 72 65 6c 6f 61 64 2e 68 |nclude "|reload.h|
|00000440| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 72 65 63 6f |".#inclu|de "reco|
|00000450| 67 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 62 |g.h".#in|clude "b|
|00000460| 61 73 69 63 2d 62 6c 6f | 63 6b 2e 68 22 0d 23 69 |asic-blo|ck.h".#i|
|00000470| 6e 63 6c 75 64 65 20 3c | 73 74 64 69 6f 2e 68 3e |nclude <|stdio.h>|
|00000480| 0d 0d 23 69 66 64 65 66 | 20 4d 50 57 0d 23 69 6e |..#ifdef| MPW.#in|
|00000490| 63 6c 75 64 65 20 3c 43 | 75 72 73 6f 72 43 74 6c |clude <C|ursorCtl|
|000004a0| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 64 65 66 |.h>.#end|if..#def|
|000004b0| 69 6e 65 20 6d 69 6e 28 | 41 2c 42 29 20 28 28 41 |ine min(|A,B) ((A|
|000004c0| 29 20 3c 20 28 42 29 20 | 3f 20 28 41 29 20 3a 20 |) < (B) |? (A) : |
|000004d0| 28 42 29 29 0d 23 64 65 | 66 69 6e 65 20 6d 61 78 |(B)).#de|fine max|
|000004e0| 28 41 2c 42 29 20 28 28 | 41 29 20 3e 20 28 42 29 |(A,B) ((|A) > (B)|
|000004f0| 20 3f 20 28 41 29 20 3a | 20 28 42 29 29 0d 0d 2f | ? (A) :| (B))../|
|00000500| 2a 20 54 68 69 73 20 66 | 69 6c 65 20 63 6f 6e 74 |* This f|ile cont|
|00000510| 61 69 6e 73 20 74 68 65 | 20 72 65 6c 6f 61 64 20 |ains the| reload |
|00000520| 70 61 73 73 20 6f 66 20 | 74 68 65 20 63 6f 6d 70 |pass of |the comp|
|00000530| 69 6c 65 72 2c 20 77 68 | 69 63 68 20 69 73 0d 20 |iler, wh|ich is. |
|00000540| 20 20 72 75 6e 20 61 66 | 74 65 72 20 72 65 67 69 | run af|ter regi|
|00000550| 73 74 65 72 20 61 6c 6c | 6f 63 61 74 69 6f 6e 20 |ster all|ocation |
|00000560| 68 61 73 20 62 65 65 6e | 20 64 6f 6e 65 2e 20 20 |has been| done. |
|00000570| 49 74 20 63 68 65 63 6b | 73 20 74 68 61 74 0d 20 |It check|s that. |
|00000580| 20 20 65 61 63 68 20 69 | 6e 73 6e 20 69 73 20 76 | each i|nsn is v|
|00000590| 61 6c 69 64 20 28 6f 70 | 65 72 61 6e 64 73 20 72 |alid (op|erands r|
|000005a0| 65 71 75 69 72 65 64 20 | 74 6f 20 62 65 20 69 6e |equired |to be in|
|000005b0| 20 72 65 67 69 73 74 65 | 72 73 20 72 65 61 6c 6c | registe|rs reall|
|000005c0| 79 0d 20 20 20 61 72 65 | 20 69 6e 20 72 65 67 69 |y. are| in regi|
|000005d0| 73 74 65 72 73 20 6f 66 | 20 74 68 65 20 70 72 6f |sters of| the pro|
|000005e0| 70 65 72 20 63 6c 61 73 | 73 29 20 61 6e 64 20 66 |per clas|s) and f|
|000005f0| 69 78 65 73 20 75 70 20 | 69 6e 76 61 6c 69 64 20 |ixes up |invalid |
|00000600| 6f 6e 65 73 0d 20 20 20 | 62 79 20 63 6f 70 79 69 |ones. |by copyi|
|00000610| 6e 67 20 76 61 6c 75 65 | 73 20 74 65 6d 70 6f 72 |ng value|s tempor|
|00000620| 61 72 69 6c 79 20 69 6e | 74 6f 20 72 65 67 69 73 |arily in|to regis|
|00000630| 74 65 72 73 20 66 6f 72 | 20 74 68 65 20 69 6e 73 |ters for| the ins|
|00000640| 6e 73 0d 20 20 20 74 68 | 61 74 20 6e 65 65 64 20 |ns. th|at need |
|00000650| 74 68 65 6d 2e 0d 0d 20 | 20 20 54 68 65 20 72 65 |them... | The re|
|00000660| 73 75 6c 74 73 20 6f 66 | 20 72 65 67 69 73 74 65 |sults of| registe|
|00000670| 72 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 20 61 72 65 |r alloca|tion are|
|00000680| 20 64 65 73 63 72 69 62 | 65 64 20 62 79 20 74 68 | describ|ed by th|
|00000690| 65 20 76 65 63 74 6f 72 | 0d 20 20 20 72 65 67 5f |e vector|. reg_|
|000006a0| 72 65 6e 75 6d 62 65 72 | 3b 20 74 68 65 20 69 6e |renumber|; the in|
|000006b0| 73 6e 73 20 73 74 69 6c | 6c 20 63 6f 6e 74 61 69 |sns stil|l contai|
|000006c0| 6e 20 70 73 65 75 64 6f | 20 72 65 67 73 2c 20 62 |n pseudo| regs, b|
|000006d0| 75 74 20 72 65 67 5f 72 | 65 6e 75 6d 62 65 72 0d |ut reg_r|enumber.|
|000006e0| 20 20 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 | can b|e used t|
|000006f0| 6f 20 66 69 6e 64 20 77 | 68 69 63 68 20 68 61 72 |o find w|hich har|
|00000700| 64 20 72 65 67 2c 20 69 | 66 20 61 6e 79 2c 20 61 |d reg, i|f any, a|
|00000710| 20 70 73 65 75 64 6f 20 | 72 65 67 20 69 73 20 69 | pseudo |reg is i|
|00000720| 6e 2e 0d 0d 20 20 20 54 | 68 65 20 74 65 63 68 6e |n... T|he techn|
|00000730| 69 71 75 65 20 77 65 20 | 61 6c 77 61 79 73 20 75 |ique we |always u|
|00000740| 73 65 20 69 73 20 74 6f | 20 66 72 65 65 20 75 70 |se is to| free up|
|00000750| 20 61 20 66 65 77 20 68 | 61 72 64 20 72 65 67 73 | a few h|ard regs|
|00000760| 20 74 68 61 74 20 61 72 | 65 0d 20 20 20 63 61 6c | that ar|e. cal|
|00000770| 6c 65 64 20 60 60 72 65 | 6c 6f 61 64 20 72 65 67 |led ``re|load reg|
|00000780| 73 27 27 2c 20 61 6e 64 | 20 66 6f 72 20 65 61 63 |s'', and| for eac|
|00000790| 68 20 70 6c 61 63 65 20 | 77 68 65 72 65 20 61 20 |h place |where a |
|000007a0| 70 73 65 75 64 6f 20 72 | 65 67 0d 20 20 20 6d 75 |pseudo r|eg. mu|
|000007b0| 73 74 20 62 65 20 69 6e | 20 61 20 68 61 72 64 20 |st be in| a hard |
|000007c0| 72 65 67 2c 20 63 6f 70 | 79 20 69 74 20 74 65 6d |reg, cop|y it tem|
|000007d0| 70 6f 72 61 72 69 6c 79 | 20 69 6e 74 6f 20 6f 6e |porarily| into on|
|000007e0| 65 20 6f 66 20 74 68 65 | 20 72 65 6c 6f 61 64 20 |e of the| reload |
|000007f0| 72 65 67 73 2e 0d 0d 20 | 20 20 41 6c 6c 20 74 68 |regs... | All th|
|00000800| 65 20 70 73 65 75 64 6f | 73 20 74 68 61 74 20 77 |e pseudo|s that w|
|00000810| 65 72 65 20 66 6f 72 6d | 65 72 6c 79 20 61 6c 6c |ere form|erly all|
|00000820| 6f 63 61 74 65 64 20 74 | 6f 20 74 68 65 20 68 61 |ocated t|o the ha|
|00000830| 72 64 20 72 65 67 73 20 | 74 68 61 74 0d 20 20 20 |rd regs |that. |
|00000840| 61 72 65 20 6e 6f 77 20 | 69 6e 20 75 73 65 20 61 |are now |in use a|
|00000850| 73 20 72 65 6c 6f 61 64 | 20 72 65 67 73 20 6d 75 |s reload| regs mu|
|00000860| 73 74 20 62 65 20 60 60 | 73 70 69 6c 6c 65 64 27 |st be ``|spilled'|
|00000870| 27 2e 20 20 54 68 69 73 | 20 6d 65 61 6e 73 0d 20 |'. This| means. |
|00000880| 20 20 74 68 61 74 20 74 | 68 65 79 20 67 6f 20 74 | that t|hey go t|
|00000890| 6f 20 6f 74 68 65 72 20 | 68 61 72 64 20 72 65 67 |o other |hard reg|
|000008a0| 73 2c 20 6f 72 20 74 6f | 20 73 74 61 63 6b 20 73 |s, or to| stack s|
|000008b0| 6c 6f 74 73 20 69 66 20 | 6e 6f 20 6f 74 68 65 72 |lots if |no other|
|000008c0| 0d 20 20 20 61 76 61 69 | 6c 61 62 6c 65 20 68 61 |. avai|lable ha|
|000008d0| 72 64 20 72 65 67 73 20 | 63 61 6e 20 62 65 20 66 |rd regs |can be f|
|000008e0| 6f 75 6e 64 2e 20 20 53 | 70 69 6c 6c 69 6e 67 20 |ound. S|pilling |
|000008f0| 63 61 6e 20 69 6e 76 61 | 6c 69 64 61 74 65 20 6d |can inva|lidate m|
|00000900| 6f 72 65 0d 20 20 20 69 | 6e 73 6e 73 2c 20 72 65 |ore. i|nsns, re|
|00000910| 71 75 69 72 69 6e 67 20 | 61 64 64 69 74 69 6f 6e |quiring |addition|
|00000920| 61 6c 20 6e 65 65 64 20 | 66 6f 72 20 72 65 6c 6f |al need |for relo|
|00000930| 61 64 73 2c 20 73 6f 20 | 77 65 20 6d 75 73 74 20 |ads, so |we must |
|00000940| 6b 65 65 70 20 63 68 65 | 63 6b 69 6e 67 0d 20 20 |keep che|cking. |
|00000950| 20 75 6e 74 69 6c 20 74 | 68 65 20 70 72 6f 63 65 | until t|he proce|
|00000960| 73 73 20 73 74 61 62 69 | 6c 69 7a 65 73 2e 0d 0d |ss stabi|lizes...|
|00000970| 20 20 20 46 6f 72 20 6d | 61 63 68 69 6e 65 73 20 | For m|achines |
|00000980| 77 69 74 68 20 64 69 66 | 66 65 72 65 6e 74 20 63 |with dif|ferent c|
|00000990| 6c 61 73 73 65 73 20 6f | 66 20 72 65 67 69 73 74 |lasses o|f regist|
|000009a0| 65 72 73 2c 20 77 65 20 | 6d 75 73 74 20 6b 65 65 |ers, we |must kee|
|000009b0| 70 20 74 72 61 63 6b 0d | 20 20 20 6f 66 20 74 68 |p track.| of th|
|000009c0| 65 20 72 65 67 69 73 74 | 65 72 20 63 6c 61 73 73 |e regist|er class|
|000009d0| 20 6e 65 65 64 65 64 20 | 66 6f 72 20 65 61 63 68 | needed |for each|
|000009e0| 20 72 65 6c 6f 61 64 2c | 20 61 6e 64 20 6d 61 6b | reload,| and mak|
|000009f0| 65 20 73 75 72 65 20 74 | 68 61 74 0d 20 20 20 77 |e sure t|hat. w|
|00000a00| 65 20 61 6c 6c 6f 63 61 | 74 65 20 65 6e 6f 75 67 |e alloca|te enoug|
|00000a10| 68 20 72 65 6c 6f 61 64 | 20 72 65 67 69 73 74 65 |h reload| registe|
|00000a20| 72 73 20 6f 66 20 65 61 | 63 68 20 63 6c 61 73 73 |rs of ea|ch class|
|00000a30| 2e 0d 0d 20 20 20 54 68 | 65 20 66 69 6c 65 20 72 |... Th|e file r|
|00000a40| 65 6c 6f 61 64 2e 63 20 | 63 6f 6e 74 61 69 6e 73 |eload.c |contains|
|00000a50| 20 74 68 65 20 63 6f 64 | 65 20 74 68 61 74 20 63 | the cod|e that c|
|00000a60| 68 65 63 6b 73 20 6f 6e | 65 20 69 6e 73 6e 20 66 |hecks on|e insn f|
|00000a70| 6f 72 0d 20 20 20 76 61 | 6c 69 64 69 74 79 20 61 |or. va|lidity a|
|00000a80| 6e 64 20 72 65 70 6f 72 | 74 73 20 74 68 65 20 72 |nd repor|ts the r|
|00000a90| 65 6c 6f 61 64 73 20 74 | 68 61 74 20 69 74 20 6e |eloads t|hat it n|
|00000aa0| 65 65 64 73 2e 20 20 54 | 68 69 73 20 66 69 6c 65 |eeds. T|his file|
|00000ab0| 0d 20 20 20 69 73 20 69 | 6e 20 63 68 61 72 67 65 |. is i|n charge|
|00000ac0| 20 6f 66 20 73 63 61 6e | 6e 69 6e 67 20 74 68 65 | of scan|ning the|
|00000ad0| 20 65 6e 74 69 72 65 20 | 72 74 6c 20 63 6f 64 65 | entire |rtl code|
|00000ae0| 2c 20 61 63 63 75 6d 75 | 6c 61 74 69 6e 67 20 74 |, accumu|lating t|
|00000af0| 68 65 0d 20 20 20 72 65 | 6c 6f 61 64 20 6e 65 65 |he. re|load nee|
|00000b00| 64 73 2c 20 73 70 69 6c | 6c 69 6e 67 2c 20 61 73 |ds, spil|ling, as|
|00000b10| 73 69 67 6e 69 6e 67 20 | 72 65 6c 6f 61 64 20 72 |signing |reload r|
|00000b20| 65 67 69 73 74 65 72 73 | 20 74 6f 20 75 73 65 20 |egisters| to use |
|00000b30| 66 6f 72 0d 20 20 20 66 | 69 78 69 6e 67 20 75 70 |for. f|ixing up|
|00000b40| 20 65 61 63 68 20 69 6e | 73 6e 2c 20 61 6e 64 20 | each in|sn, and |
|00000b50| 67 65 6e 65 72 61 74 69 | 6e 67 20 74 68 65 20 6e |generati|ng the n|
|00000b60| 65 77 20 69 6e 73 6e 73 | 20 74 6f 20 63 6f 70 79 |ew insns| to copy|
|00000b70| 20 76 61 6c 75 65 73 0d | 20 20 20 69 6e 74 6f 20 | values.| into |
|00000b80| 74 68 65 20 72 65 6c 6f | 61 64 20 72 65 67 69 73 |the relo|ad regis|
|00000b90| 74 65 72 73 2e 20 20 2a | 2f 0d 0c 0d 2f 2a 20 44 |ters. *|/.../* D|
|00000ba0| 75 72 69 6e 67 20 72 65 | 6c 6f 61 64 5f 61 73 5f |uring re|load_as_|
|00000bb0| 6e 65 65 64 65 64 2c 20 | 65 6c 65 6d 65 6e 74 20 |needed, |element |
|00000bc0| 4e 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 52 45 47 |N contai|ns a REG|
|00000bd0| 20 72 74 78 20 66 6f 72 | 20 74 68 65 20 68 61 72 | rtx for| the har|
|00000be0| 64 20 72 65 67 0d 20 20 | 20 69 6e 74 6f 20 77 68 |d reg. | into wh|
|00000bf0| 69 63 68 20 70 73 65 75 | 64 6f 20 72 65 67 20 4e |ich pseu|do reg N|
|00000c00| 20 68 61 73 20 62 65 65 | 6e 20 72 65 6c 6f 61 64 | has bee|n reload|
|00000c10| 65 64 20 28 70 65 72 68 | 61 70 73 20 66 6f 72 20 |ed (perh|aps for |
|00000c20| 61 20 70 72 65 76 69 6f | 75 73 20 69 6e 73 6e 29 |a previo|us insn)|
|00000c30| 2e 20 2a 2f 0d 73 74 61 | 74 69 63 20 72 74 78 20 |. */.sta|tic rtx |
|00000c40| 2a 72 65 67 5f 6c 61 73 | 74 5f 72 65 6c 6f 61 64 |*reg_las|t_reload|
|00000c50| 5f 72 65 67 3b 0d 0d 2f | 2a 20 45 6c 74 20 4e 20 |_reg;../|* Elt N |
|00000c60| 6e 6f 6e 7a 65 72 6f 20 | 69 66 20 72 65 67 5f 6c |nonzero |if reg_l|
|00000c70| 61 73 74 5f 72 65 6c 6f | 61 64 5f 72 65 67 5b 4e |ast_relo|ad_reg[N|
|00000c80| 5d 20 68 61 73 20 62 65 | 65 6e 20 73 65 74 20 69 |] has be|en set i|
|00000c90| 6e 20 74 68 69 73 20 69 | 6e 73 6e 0d 20 20 20 66 |n this i|nsn. f|
|00000ca0| 6f 72 20 61 6e 20 6f 75 | 74 70 75 74 20 72 65 6c |or an ou|tput rel|
|00000cb0| 6f 61 64 20 74 68 61 74 | 20 73 74 6f 72 65 73 20 |oad that| stores |
|00000cc0| 69 6e 74 6f 20 72 65 67 | 20 4e 2e 20 20 2a 2f 0d |into reg| N. */.|
|00000cd0| 73 74 61 74 69 63 20 63 | 68 61 72 20 2a 72 65 67 |static c|har *reg|
|00000ce0| 5f 68 61 73 5f 6f 75 74 | 70 75 74 5f 72 65 6c 6f |_has_out|put_relo|
|00000cf0| 61 64 3b 0d 0d 2f 2a 20 | 45 6c 74 20 4e 20 6e 6f |ad;../* |Elt N no|
|00000d00| 6e 7a 65 72 6f 20 69 66 | 20 68 61 72 64 20 72 65 |nzero if| hard re|
|00000d10| 67 20 4e 20 69 73 20 61 | 20 72 65 6c 6f 61 64 2d |g N is a| reload-|
|00000d20| 72 65 67 69 73 74 65 72 | 20 66 6f 72 20 61 6e 20 |register| for an |
|00000d30| 6f 75 74 70 75 74 20 72 | 65 6c 6f 61 64 0d 20 20 |output r|eload. |
|00000d40| 20 69 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | in the |current |
|00000d50| 69 6e 73 6e 2e 20 20 2a | 2f 0d 73 74 61 74 69 63 |insn. *|/.static|
|00000d60| 20 63 68 61 72 20 72 65 | 67 5f 69 73 5f 6f 75 74 | char re|g_is_out|
|00000d70| 70 75 74 5f 72 65 6c 6f | 61 64 5b 46 49 52 53 54 |put_relo|ad[FIRST|
|00000d80| 5f 50 53 45 55 44 4f 5f | 52 45 47 49 53 54 45 52 |_PSEUDO_|REGISTER|
|00000d90| 5d 3b 0d 0d 2f 2a 20 45 | 6c 65 6d 65 6e 74 20 4e |];../* E|lement N|
|00000da0| 20 69 73 20 74 68 65 20 | 63 6f 6e 73 74 61 6e 74 | is the |constant|
|00000db0| 20 76 61 6c 75 65 20 74 | 6f 20 77 68 69 63 68 20 | value t|o which |
|00000dc0| 70 73 65 75 64 6f 20 72 | 65 67 20 4e 20 69 73 20 |pseudo r|eg N is |
|00000dd0| 65 71 75 69 76 61 6c 65 | 6e 74 2c 0d 20 20 20 6f |equivale|nt,. o|
|00000de0| 72 20 7a 65 72 6f 20 69 | 66 20 70 73 65 75 64 6f |r zero i|f pseudo|
|00000df0| 20 72 65 67 20 4e 20 69 | 73 20 6e 6f 74 20 65 71 | reg N i|s not eq|
|00000e00| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 61 20 63 6f |uivalent| to a co|
|00000e10| 6e 73 74 61 6e 74 2e 0d | 20 20 20 66 69 6e 64 5f |nstant..| find_|
|00000e20| 72 65 6c 6f 61 64 73 20 | 6c 6f 6f 6b 73 20 61 74 |reloads |looks at|
|00000e30| 20 74 68 69 73 20 69 6e | 20 6f 72 64 65 72 20 74 | this in| order t|
|00000e40| 6f 20 72 65 70 6c 61 63 | 65 20 70 73 65 75 64 6f |o replac|e pseudo|
|00000e50| 20 72 65 67 20 4e 0d 20 | 20 20 77 69 74 68 20 74 | reg N. | with t|
|00000e60| 68 65 20 63 6f 6e 73 74 | 61 6e 74 20 69 74 20 73 |he const|ant it s|
|00000e70| 74 61 6e 64 73 20 66 6f | 72 2e 20 20 2a 2f 0d 72 |tands fo|r. */.r|
|00000e80| 74 78 20 2a 72 65 67 5f | 65 71 75 69 76 5f 63 6f |tx *reg_|equiv_co|
|00000e90| 6e 73 74 61 6e 74 3b 0d | 0d 2f 2a 20 45 6c 65 6d |nstant;.|./* Elem|
|00000ea0| 65 6e 74 20 4e 20 69 73 | 20 74 68 65 20 61 64 64 |ent N is| the add|
|00000eb0| 72 65 73 73 20 6f 66 20 | 73 74 61 63 6b 20 73 6c |ress of |stack sl|
|00000ec0| 6f 74 20 74 6f 20 77 68 | 69 63 68 20 70 73 65 75 |ot to wh|ich pseu|
|00000ed0| 64 6f 20 72 65 67 20 4e | 20 69 73 20 65 71 75 69 |do reg N| is equi|
|00000ee0| 76 61 6c 65 6e 74 2e 0d | 20 20 20 54 68 69 73 20 |valent..| This |
|00000ef0| 69 73 20 75 73 65 64 20 | 77 68 65 6e 20 74 68 65 |is used |when the|
|00000f00| 20 61 64 64 72 65 73 73 | 20 69 73 20 6e 6f 74 20 | address| is not |
|00000f10| 76 61 6c 69 64 20 61 73 | 20 61 20 6d 65 6d 6f 72 |valid as| a memor|
|00000f20| 79 20 61 64 64 72 65 73 | 73 0d 20 20 20 28 62 65 |y addres|s. (be|
|00000f30| 63 61 75 73 65 20 69 74 | 73 20 64 69 73 70 6c 61 |cause it|s displa|
|00000f40| 63 65 6d 65 6e 74 20 69 | 73 20 74 6f 6f 20 62 69 |cement i|s too bi|
|00000f50| 67 20 66 6f 72 20 74 68 | 65 20 6d 61 63 68 69 6e |g for th|e machin|
|00000f60| 65 2e 29 20 20 2a 2f 0d | 72 74 78 20 2a 72 65 67 |e.) */.|rtx *reg|
|00000f70| 5f 65 71 75 69 76 5f 61 | 64 64 72 65 73 73 3b 0d |_equiv_a|ddress;.|
|00000f80| 0d 2f 2a 20 45 6c 65 6d | 65 6e 74 20 4e 20 69 73 |./* Elem|ent N is|
|00000f90| 20 74 68 65 20 6d 65 6d | 6f 72 79 20 73 6c 6f 74 | the mem|ory slot|
|00000fa0| 20 74 6f 20 77 68 69 63 | 68 20 70 73 65 75 64 6f | to whic|h pseudo|
|00000fb0| 20 72 65 67 20 4e 20 69 | 73 20 65 71 75 69 76 61 | reg N i|s equiva|
|00000fc0| 6c 65 6e 74 2c 0d 20 20 | 20 6f 72 20 7a 65 72 6f |lent,. | or zero|
|00000fd0| 20 69 66 20 70 73 65 75 | 64 6f 20 72 65 67 20 4e | if pseu|do reg N|
|00000fe0| 20 69 73 20 6e 6f 74 20 | 65 71 75 69 76 61 6c 65 | is not |equivale|
|00000ff0| 6e 74 20 74 6f 20 61 20 | 6d 65 6d 6f 72 79 20 73 |nt to a |memory s|
|00001000| 6c 6f 74 2e 20 20 2a 2f | 0d 72 74 78 20 2a 72 65 |lot. */|.rtx *re|
|00001010| 67 5f 65 71 75 69 76 5f | 6d 65 6d 3b 0d 0d 2f 2a |g_equiv_|mem;../*|
|00001020| 20 57 69 64 65 73 74 20 | 77 69 64 74 68 20 69 6e | Widest |width in|
|00001030| 20 77 68 69 63 68 20 65 | 61 63 68 20 70 73 65 75 | which e|ach pseu|
|00001040| 64 6f 20 72 65 67 20 69 | 73 20 72 65 66 65 72 72 |do reg i|s referr|
|00001050| 65 64 20 74 6f 20 28 76 | 69 61 20 73 75 62 72 65 |ed to (v|ia subre|
|00001060| 67 29 2e 20 20 2a 2f 0d | 73 74 61 74 69 63 20 69 |g). */.|static i|
|00001070| 6e 74 20 2a 72 65 67 5f | 6d 61 78 5f 72 65 66 5f |nt *reg_|max_ref_|
|00001080| 77 69 64 74 68 3b 0d 0d | 2f 2a 20 45 6c 65 6d 65 |width;..|/* Eleme|
|00001090| 6e 74 20 4e 20 69 73 20 | 74 68 65 20 69 6e 73 6e |nt N is |the insn|
|000010a0| 20 74 68 61 74 20 69 6e | 69 74 69 61 6c 69 7a 65 | that in|itialize|
|000010b0| 64 20 72 65 67 20 4e 20 | 66 72 6f 6d 20 69 74 73 |d reg N |from its|
|000010c0| 20 65 71 75 69 76 61 6c | 65 6e 74 0d 20 20 20 63 | equival|ent. c|
|000010d0| 6f 6e 73 74 61 6e 74 20 | 6f 72 20 6d 65 6d 6f 72 |onstant |or memor|
|000010e0| 79 20 73 6c 6f 74 2e 20 | 20 2a 2f 0d 73 74 61 74 |y slot. | */.stat|
|000010f0| 69 63 20 72 74 78 20 2a | 72 65 67 5f 65 71 75 69 |ic rtx *|reg_equi|
|00001100| 76 5f 69 6e 69 74 3b 0d | 0d 2f 2a 20 44 75 72 69 |v_init;.|./* Duri|
|00001110| 6e 67 20 72 65 6c 6f 61 | 64 5f 61 73 5f 6e 65 65 |ng reloa|d_as_nee|
|00001120| 64 65 64 2c 20 65 6c 65 | 6d 65 6e 74 20 4e 20 63 |ded, ele|ment N c|
|00001130| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 6c 61 73 74 |ontains |the last|
|00001140| 20 70 73 65 75 64 6f 20 | 72 65 67 6e 6f 0d 20 20 | pseudo |regno. |
|00001150| 20 72 65 6c 6f 61 64 65 | 64 20 69 6e 74 6f 20 74 | reloade|d into t|
|00001160| 68 65 20 4e 74 68 20 72 | 65 6c 6f 61 64 20 72 65 |he Nth r|eload re|
|00001170| 67 69 73 74 65 72 2e 20 | 20 54 68 69 73 20 76 65 |gister. | This ve|
|00001180| 63 74 6f 72 20 69 73 20 | 69 6e 20 70 61 72 61 6c |ctor is |in paral|
|00001190| 6c 65 6c 0d 20 20 20 77 | 69 74 68 20 73 70 69 6c |lel. w|ith spil|
|000011a0| 6c 5f 72 65 67 73 2e 20 | 20 2a 2f 0d 73 74 61 74 |l_regs. | */.stat|
|000011b0| 69 63 20 69 6e 74 20 72 | 65 67 5f 72 65 6c 6f 61 |ic int r|eg_reloa|
|000011c0| 64 65 64 5f 63 6f 6e 74 | 65 6e 74 73 5b 46 49 52 |ded_cont|ents[FIR|
|000011d0| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|000011e0| 45 52 5d 3b 0d 0d 2f 2a | 20 4e 75 6d 62 65 72 20 |ER];../*| Number |
|000011f0| 6f 66 20 73 70 69 6c 6c | 2d 72 65 67 73 20 73 6f |of spill|-regs so|
|00001200| 20 66 61 72 3b 20 6e 75 | 6d 62 65 72 20 6f 66 20 | far; nu|mber of |
|00001210| 76 61 6c 69 64 20 65 6c | 65 6d 65 6e 74 73 20 6f |valid el|ements o|
|00001220| 66 20 73 70 69 6c 6c 5f | 72 65 67 73 2e 20 20 2a |f spill_|regs. *|
|00001230| 2f 0d 73 74 61 74 69 63 | 20 69 6e 74 20 6e 5f 73 |/.static| int n_s|
|00001240| 70 69 6c 6c 73 3b 0d 0d | 2f 2a 20 49 6e 20 70 61 |pills;..|/* In pa|
|00001250| 72 61 6c 6c 65 6c 20 77 | 69 74 68 20 73 70 69 6c |rallel w|ith spil|
|00001260| 6c 5f 72 65 67 73 2c 20 | 63 6f 6e 74 61 69 6e 73 |l_regs, |contains|
|00001270| 20 52 45 47 20 72 74 78 | 27 73 20 66 6f 72 20 74 | REG rtx|'s for t|
|00001280| 68 6f 73 65 20 72 65 67 | 73 2e 0d 20 20 20 48 6f |hose reg|s.. Ho|
|00001290| 6c 64 73 20 74 68 65 20 | 6c 61 73 74 20 72 74 78 |lds the |last rtx|
|000012a0| 20 75 73 65 64 20 66 6f | 72 20 61 6e 79 20 67 69 | used fo|r any gi|
|000012b0| 76 65 6e 20 72 65 67 2c | 20 6f 72 20 30 20 69 66 |ven reg,| or 0 if|
|000012c0| 20 69 74 20 68 61 73 20 | 6e 65 76 65 72 0d 20 20 | it has |never. |
|000012d0| 20 62 65 65 6e 20 75 73 | 65 64 20 66 6f 72 20 73 | been us|ed for s|
|000012e0| 70 69 6c 6c 69 6e 67 20 | 79 65 74 2e 20 20 54 68 |pilling |yet. Th|
|000012f0| 69 73 20 72 74 78 20 69 | 73 20 72 65 75 73 65 64 |is rtx i|s reused|
|00001300| 2c 20 70 72 6f 76 69 64 | 65 64 20 69 74 20 68 61 |, provid|ed it ha|
|00001310| 73 0d 20 20 20 74 68 65 | 20 70 72 6f 70 65 72 20 |s. the| proper |
|00001320| 6d 6f 64 65 2e 20 20 2a | 2f 0d 73 74 61 74 69 63 |mode. *|/.static|
|00001330| 20 72 74 78 20 73 70 69 | 6c 6c 5f 72 65 67 5f 72 | rtx spi|ll_reg_r|
|00001340| 74 78 5b 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f |tx[FIRST|_PSEUDO_|
|00001350| 52 45 47 49 53 54 45 52 | 5d 3b 0d 0d 2f 2a 20 49 |REGISTER|];../* I|
|00001360| 6e 20 70 61 72 61 6c 6c | 65 6c 20 77 69 74 68 20 |n parall|el with |
|00001370| 73 70 69 6c 6c 5f 72 65 | 67 73 2c 20 63 6f 6e 74 |spill_re|gs, cont|
|00001380| 61 69 6e 73 20 6e 6f 6e | 7a 65 72 6f 20 66 6f 72 |ains non|zero for|
|00001390| 20 61 20 73 70 69 6c 6c | 20 72 65 67 0d 20 20 20 | a spill| reg. |
|000013a0| 74 68 61 74 20 77 61 73 | 20 73 74 6f 72 65 64 20 |that was| stored |
|000013b0| 61 66 74 65 72 20 74 68 | 65 20 6c 61 73 74 20 74 |after th|e last t|
|000013c0| 69 6d 65 20 69 74 20 77 | 61 73 20 75 73 65 64 2e |ime it w|as used.|
|000013d0| 0d 20 20 20 54 68 65 20 | 70 72 65 63 69 73 65 20 |. The |precise |
|000013e0| 76 61 6c 75 65 20 69 73 | 20 74 68 65 20 69 6e 73 |value is| the ins|
|000013f0| 6e 20 67 65 6e 65 72 61 | 74 65 64 20 74 6f 20 64 |n genera|ted to d|
|00001400| 6f 20 74 68 65 20 73 74 | 6f 72 65 2e 20 20 2a 2f |o the st|ore. */|
|00001410| 0d 73 74 61 74 69 63 20 | 72 74 78 20 73 70 69 6c |.static |rtx spil|
|00001420| 6c 5f 72 65 67 5f 73 74 | 6f 72 65 5b 46 49 52 53 |l_reg_st|ore[FIRS|
|00001430| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00001440| 52 5d 3b 0d 0d 2f 2a 20 | 54 68 69 73 20 74 61 62 |R];../* |This tab|
|00001450| 6c 65 20 69 73 20 74 68 | 65 20 69 6e 76 65 72 73 |le is th|e invers|
|00001460| 65 20 6d 61 70 70 69 6e | 67 20 6f 66 20 73 70 69 |e mappin|g of spi|
|00001470| 6c 6c 5f 72 65 67 73 3a | 0d 20 20 20 69 6e 64 65 |ll_regs:|. inde|
|00001480| 78 65 64 20 62 79 20 68 | 61 72 64 20 72 65 67 20 |xed by h|ard reg |
|00001490| 6e 75 6d 62 65 72 2c 0d | 20 20 20 69 74 20 63 6f |number,.| it co|
|000014a0| 6e 74 61 69 6e 73 20 74 | 68 65 20 70 6f 73 69 74 |ntains t|he posit|
|000014b0| 69 6f 6e 20 6f 66 20 74 | 68 61 74 20 72 65 67 20 |ion of t|hat reg |
|000014c0| 69 6e 20 73 70 69 6c 6c | 5f 72 65 67 73 2c 0d 20 |in spill|_regs,. |
|000014d0| 20 20 6f 72 20 2d 31 20 | 66 6f 72 20 73 6f 6d 65 | or -1 |for some|
|000014e0| 74 68 69 6e 67 20 74 68 | 61 74 20 69 73 20 6e 6f |thing th|at is no|
|000014f0| 74 20 69 6e 20 73 70 69 | 6c 6c 5f 72 65 67 73 2e |t in spi|ll_regs.|
|00001500| 20 20 2a 2f 0d 73 74 61 | 74 69 63 20 73 68 6f 72 | */.sta|tic shor|
|00001510| 74 20 73 70 69 6c 6c 5f | 72 65 67 5f 6f 72 64 65 |t spill_|reg_orde|
|00001520| 72 5b 46 49 52 53 54 5f | 50 53 45 55 44 4f 5f 52 |r[FIRST_|PSEUDO_R|
|00001530| 45 47 49 53 54 45 52 5d | 3b 0d 0d 2f 2a 20 54 68 |EGISTER]|;../* Th|
|00001540| 69 73 20 74 61 62 6c 65 | 20 63 6f 6e 74 61 69 6e |is table| contain|
|00001550| 73 20 31 20 66 6f 72 20 | 61 20 72 65 67 69 73 74 |s 1 for |a regist|
|00001560| 65 72 20 74 68 61 74 20 | 6d 61 79 20 6e 6f 74 20 |er that |may not |
|00001570| 62 65 20 75 73 65 64 0d | 20 20 20 66 6f 72 20 72 |be used.| for r|
|00001580| 65 74 72 79 69 6e 67 20 | 67 6c 6f 62 61 6c 20 61 |etrying |global a|
|00001590| 6c 6c 6f 63 61 74 69 6f | 6e 2c 20 6f 72 20 2d 31 |llocatio|n, or -1|
|000015a0| 20 66 6f 72 20 61 20 72 | 65 67 69 73 74 65 72 20 | for a r|egister |
|000015b0| 74 68 61 74 20 6d 61 79 | 20 62 65 20 75 73 65 64 |that may| be used|
|000015c0| 2e 0d 20 20 20 54 68 65 | 20 72 65 67 69 73 74 65 |.. The| registe|
|000015d0| 72 73 20 74 68 61 74 20 | 6d 61 79 20 6e 6f 74 20 |rs that |may not |
|000015e0| 62 65 20 75 73 65 64 20 | 69 6e 63 6c 75 64 65 20 |be used |include |
|000015f0| 61 6c 6c 20 73 70 69 6c | 6c 20 72 65 67 69 73 74 |all spil|l regist|
|00001600| 65 72 73 0d 20 20 20 61 | 6e 64 20 74 68 65 20 66 |ers. a|nd the f|
|00001610| 72 61 6d 65 20 70 6f 69 | 6e 74 65 72 20 28 69 66 |rame poi|nter (if|
|00001620| 20 77 65 20 61 72 65 20 | 75 73 69 6e 67 20 6f 6e | we are |using on|
|00001630| 65 29 2e 20 20 2a 2f 0d | 73 74 61 74 69 63 20 73 |e). */.|static s|
|00001640| 68 6f 72 74 20 66 6f 72 | 62 69 64 64 65 6e 5f 72 |hort for|bidden_r|
|00001650| 65 67 73 5b 46 49 52 53 | 54 5f 50 53 45 55 44 4f |egs[FIRS|T_PSEUDO|
|00001660| 5f 52 45 47 49 53 54 45 | 52 5d 3b 0d 0d 2f 2a 20 |_REGISTE|R];../* |
|00001670| 44 65 73 63 72 69 62 65 | 73 20 6f 72 64 65 72 20 |Describe|s order |
|00001680| 6f 66 20 75 73 65 20 6f | 66 20 72 65 67 69 73 74 |of use o|f regist|
|00001690| 65 72 73 20 66 6f 72 20 | 72 65 6c 6f 61 64 69 6e |ers for |reloadin|
|000016a0| 67 0d 20 20 20 6f 66 20 | 73 70 69 6c 6c 65 64 20 |g. of |spilled |
|000016b0| 70 73 65 75 64 6f 2d 72 | 65 67 69 73 74 65 72 73 |pseudo-r|egisters|
|000016c0| 2e 20 20 60 73 70 69 6c | 6c 73 27 20 69 73 20 74 |. `spil|ls' is t|
|000016d0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 0d 20 20 20 |he numbe|r of. |
|000016e0| 65 6c 65 6d 65 6e 74 73 | 20 74 68 61 74 20 61 72 |elements| that ar|
|000016f0| 65 20 61 63 74 75 61 6c | 6c 79 20 76 61 6c 69 64 |e actual|ly valid|
|00001700| 3b 20 6e 65 77 20 6f 6e | 65 73 20 61 72 65 20 61 |; new on|es are a|
|00001710| 64 64 65 64 20 61 74 20 | 74 68 65 20 65 6e 64 2e |dded at |the end.|
|00001720| 20 20 2a 2f 0d 73 74 61 | 74 69 63 20 63 68 61 72 | */.sta|tic char|
|00001730| 20 73 70 69 6c 6c 5f 72 | 65 67 73 5b 46 49 52 53 | spill_r|egs[FIRS|
|00001740| 54 5f 50 53 45 55 44 4f | 5f 52 45 47 49 53 54 45 |T_PSEUDO|_REGISTE|
|00001750| 52 5d 3b 0d 0d 2f 2a 20 | 44 65 73 63 72 69 62 65 |R];../* |Describe|
|00001760| 73 20 6f 72 64 65 72 20 | 6f 66 20 70 72 65 66 65 |s order |of prefe|
|00001770| 72 65 6e 63 65 20 66 6f | 72 20 70 75 74 74 69 6e |rence fo|r puttin|
|00001780| 67 20 72 65 67 73 20 69 | 6e 74 6f 20 73 70 69 6c |g regs i|nto spil|
|00001790| 6c 5f 72 65 67 73 2e 0d | 20 20 20 43 6f 6e 74 61 |l_regs..| Conta|
|000017a0| 69 6e 73 20 74 68 65 20 | 6e 75 6d 62 65 72 73 20 |ins the |numbers |
|000017b0| 6f 66 20 61 6c 6c 20 74 | 68 65 20 68 61 72 64 20 |of all t|he hard |
|000017c0| 72 65 67 73 2c 20 69 6e | 20 6f 72 64 65 72 20 6d |regs, in| order m|
|000017d0| 6f 73 74 20 70 72 65 66 | 65 72 72 65 64 20 66 69 |ost pref|erred fi|
|000017e0| 72 73 74 2e 0d 20 20 20 | 54 68 69 73 20 6f 72 64 |rst.. |This ord|
|000017f0| 65 72 20 69 73 20 64 69 | 66 66 65 72 65 6e 74 20 |er is di|fferent |
|00001800| 66 6f 72 20 65 61 63 68 | 20 66 75 6e 63 74 69 6f |for each| functio|
|00001810| 6e 2e 0d 20 20 20 49 74 | 20 69 73 20 73 65 74 20 |n.. It| is set |
|00001820| 75 70 20 62 79 20 6f 72 | 64 65 72 5f 72 65 67 73 |up by or|der_regs|
|00001830| 5f 66 6f 72 5f 72 65 6c | 6f 61 64 2e 0d 20 20 20 |_for_rel|oad.. |
|00001840| 45 6d 70 74 79 20 65 6c | 65 6d 65 6e 74 73 20 61 |Empty el|ements a|
|00001850| 74 20 74 68 65 20 65 6e | 64 20 63 6f 6e 74 61 69 |t the en|d contai|
|00001860| 6e 20 2d 31 2e 20 20 2a | 2f 0d 73 74 61 74 69 63 |n -1. *|/.static|
|00001870| 20 73 68 6f 72 74 20 70 | 6f 74 65 6e 74 69 61 6c | short p|otential|
|00001880| 5f 72 65 6c 6f 61 64 5f | 72 65 67 73 5b 46 49 52 |_reload_|regs[FIR|
|00001890| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|000018a0| 45 52 5d 3b 0d 0d 2f 2a | 20 31 20 66 6f 72 20 61 |ER];../*| 1 for a|
|000018b0| 20 68 61 72 64 20 72 65 | 67 69 73 74 65 72 20 74 | hard re|gister t|
|000018c0| 68 61 74 20 61 70 70 65 | 61 72 73 20 65 78 70 6c |hat appe|ars expl|
|000018d0| 69 63 69 74 6c 79 20 69 | 6e 20 74 68 65 20 72 74 |icitly i|n the rt|
|000018e0| 6c 0d 20 20 20 28 66 6f | 72 20 65 78 61 6d 70 6c |l. (fo|r exampl|
|000018f0| 65 2c 20 66 75 6e 63 74 | 69 6f 6e 20 76 61 6c 75 |e, funct|ion valu|
|00001900| 65 20 72 65 67 69 73 74 | 65 72 73 2c 20 73 70 65 |e regist|ers, spe|
|00001910| 63 69 61 6c 20 72 65 67 | 69 73 74 65 72 73 0d 20 |cial reg|isters. |
|00001920| 20 20 75 73 65 64 20 62 | 79 20 69 6e 73 6e 73 2c | used b|y insns,|
|00001930| 20 73 74 72 75 63 74 75 | 72 65 20 76 61 6c 75 65 | structu|re value|
|00001940| 20 70 6f 69 6e 74 65 72 | 20 72 65 67 69 73 74 65 | pointer| registe|
|00001950| 72 73 29 2e 20 20 2a 2f | 0d 73 74 61 74 69 63 20 |rs). */|.static |
|00001960| 63 68 61 72 20 72 65 67 | 73 5f 65 78 70 6c 69 63 |char reg|s_explic|
|00001970| 69 74 6c 79 5f 75 73 65 | 64 5b 46 49 52 53 54 5f |itly_use|d[FIRST_|
|00001980| 50 53 45 55 44 4f 5f 52 | 45 47 49 53 54 45 52 5d |PSEUDO_R|EGISTER]|
|00001990| 3b 0d 0d 2f 2a 20 46 6f | 72 20 65 61 63 68 20 72 |;../* Fo|r each r|
|000019a0| 65 67 69 73 74 65 72 2c | 20 31 20 69 66 20 69 74 |egister,| 1 if it|
|000019b0| 20 77 61 73 20 63 6f 75 | 6e 74 65 64 20 61 67 61 | was cou|nted aga|
|000019c0| 69 6e 73 74 20 74 68 65 | 20 6e 65 65 64 20 66 6f |inst the| need fo|
|000019d0| 72 0d 20 20 20 67 72 6f | 75 70 73 2e 20 20 30 20 |r. gro|ups. 0 |
|000019e0| 6d 65 61 6e 73 20 69 74 | 20 63 61 6e 20 63 6f 75 |means it| can cou|
|000019f0| 6e 74 20 61 67 61 69 6e | 73 74 20 6d 61 78 5f 6e |nt again|st max_n|
|00001a00| 6f 6e 67 72 6f 75 70 20 | 69 6e 73 74 65 61 64 2e |ongroup |instead.|
|00001a10| 20 20 2a 2f 0d 73 74 61 | 74 69 63 20 63 68 61 72 | */.sta|tic char|
|00001a20| 20 63 6f 75 6e 74 65 64 | 5f 66 6f 72 5f 67 72 6f | counted|_for_gro|
|00001a30| 75 70 73 5b 46 49 52 53 | 54 5f 50 53 45 55 44 4f |ups[FIRS|T_PSEUDO|
|00001a40| 5f 52 45 47 49 53 54 45 | 52 5d 3b 0d 0d 2f 2a 20 |_REGISTE|R];../* |
|00001a50| 46 6f 72 20 65 61 63 68 | 20 72 65 67 69 73 74 65 |For each| registe|
|00001a60| 72 2c 20 31 20 69 66 20 | 69 74 20 77 61 73 20 63 |r, 1 if |it was c|
|00001a70| 6f 75 6e 74 65 64 20 61 | 67 61 69 6e 73 74 20 74 |ounted a|gainst t|
|00001a80| 68 65 20 6e 65 65 64 20 | 66 6f 72 0d 20 20 20 6e |he need |for. n|
|00001a90| 6f 6e 2d 67 72 6f 75 70 | 73 2e 20 20 30 20 6d 65 |on-group|s. 0 me|
|00001aa0| 61 6e 73 20 69 74 20 63 | 61 6e 20 62 65 63 6f 6d |ans it c|an becom|
|00001ab0| 65 20 70 61 72 74 20 6f | 66 20 61 20 6e 65 77 20 |e part o|f a new |
|00001ac0| 67 72 6f 75 70 2e 0d 20 | 20 20 44 75 72 69 6e 67 |group.. | During|
|00001ad0| 20 63 68 6f 6f 73 65 5f | 72 65 6c 6f 61 64 5f 72 | choose_|reload_r|
|00001ae0| 65 67 73 2c 20 31 20 68 | 65 72 65 20 6d 65 61 6e |egs, 1 h|ere mean|
|00001af0| 73 20 64 6f 6e 27 74 20 | 75 73 65 20 74 68 69 73 |s don't |use this|
|00001b00| 20 72 65 67 0d 20 20 20 | 61 73 20 70 61 72 74 20 | reg. |as part |
|00001b10| 6f 66 20 61 20 67 72 6f | 75 70 2c 20 65 76 65 6e |of a gro|up, even|
|00001b20| 20 69 66 20 69 74 20 73 | 65 65 6d 73 20 74 6f 20 | if it s|eems to |
|00001b30| 62 65 20 6f 74 68 65 72 | 77 69 73 65 20 6f 6b 2e |be other|wise ok.|
|00001b40| 20 20 2a 2f 0d 73 74 61 | 74 69 63 20 63 68 61 72 | */.sta|tic char|
|00001b50| 20 63 6f 75 6e 74 65 64 | 5f 66 6f 72 5f 6e 6f 6e | counted|_for_non|
|00001b60| 67 72 6f 75 70 73 5b 46 | 49 52 53 54 5f 50 53 45 |groups[F|IRST_PSE|
|00001b70| 55 44 4f 5f 52 45 47 49 | 53 54 45 52 5d 3b 0d 0d |UDO_REGI|STER];..|
|00001b80| 2f 2a 20 4e 6f 6e 7a 65 | 72 6f 20 69 66 20 73 70 |/* Nonze|ro if sp|
|00001b90| 69 6c 6c 69 6e 67 20 28 | 52 45 47 20 6e 29 20 64 |illing (|REG n) d|
|00001ba0| 6f 65 73 20 6e 6f 74 20 | 72 65 71 75 69 72 65 20 |oes not |require |
|00001bb0| 72 65 6c 6f 61 64 69 6e | 67 20 69 74 20 69 6e 74 |reloadin|g it int|
|00001bc0| 6f 0d 20 20 20 61 20 72 | 65 67 69 73 74 65 72 20 |o. a r|egister |
|00001bd0| 69 6e 20 6f 72 64 65 72 | 20 74 6f 20 64 6f 20 28 |in order| to do (|
|00001be0| 4d 45 4d 20 28 52 45 47 | 20 6e 29 29 2e 20 20 2a |MEM (REG| n)). *|
|00001bf0| 2f 0d 0d 73 74 61 74 69 | 63 20 63 68 61 72 20 73 |/..stati|c char s|
|00001c00| 70 69 6c 6c 5f 69 6e 64 | 69 72 65 63 74 5f 6f 6b |pill_ind|irect_ok|
|00001c10| 3b 0d 0d 2f 2a 20 4e 6f | 6e 7a 65 72 6f 20 69 66 |;../* No|nzero if|
|00001c20| 20 61 6e 20 61 64 64 72 | 65 73 73 20 28 70 6c 75 | an addr|ess (plu|
|00001c30| 73 20 28 72 65 67 20 66 | 72 61 6d 65 5f 70 6f 69 |s (reg f|rame_poi|
|00001c40| 6e 74 65 72 29 20 28 72 | 65 67 20 2e 2e 2e 29 29 |nter) (r|eg ...))|
|00001c50| 20 69 73 20 76 61 6c 69 | 64 2e 20 20 2a 2f 0d 0d | is vali|d. */..|
|00001c60| 63 68 61 72 20 64 6f 75 | 62 6c 65 5f 72 65 67 5f |char dou|ble_reg_|
|00001c70| 61 64 64 72 65 73 73 5f | 6f 6b 3b 0d 0d 2f 2a 20 |address_|ok;../* |
|00001c80| 52 65 63 6f 72 64 20 74 | 68 65 20 73 74 61 63 6b |Record t|he stack|
|00001c90| 20 73 6c 6f 74 20 66 6f | 72 20 65 61 63 68 20 73 | slot fo|r each s|
|00001ca0| 70 69 6c 6c 65 64 20 68 | 61 72 64 20 72 65 67 69 |pilled h|ard regi|
|00001cb0| 73 74 65 72 2e 20 20 2a | 2f 0d 0d 73 74 61 74 69 |ster. *|/..stati|
|00001cc0| 63 20 72 74 78 20 73 70 | 69 6c 6c 5f 73 74 61 63 |c rtx sp|ill_stac|
|00001cd0| 6b 5f 73 6c 6f 74 5b 46 | 49 52 53 54 5f 50 53 45 |k_slot[F|IRST_PSE|
|00001ce0| 55 44 4f 5f 52 45 47 49 | 53 54 45 52 5d 3b 0d 0d |UDO_REGI|STER];..|
|00001cf0| 2f 2a 20 57 69 64 74 68 | 20 61 6c 6c 6f 63 61 74 |/* Width| allocat|
|00001d00| 65 64 20 73 6f 20 66 61 | 72 20 66 6f 72 20 74 68 |ed so fa|r for th|
|00001d10| 61 74 20 73 74 61 63 6b | 20 73 6c 6f 74 2e 20 20 |at stack| slot. |
|00001d20| 2a 2f 0d 0d 73 74 61 74 | 69 63 20 69 6e 74 20 73 |*/..stat|ic int s|
|00001d30| 70 69 6c 6c 5f 73 74 61 | 63 6b 5f 73 6c 6f 74 5f |pill_sta|ck_slot_|
|00001d40| 77 69 64 74 68 5b 46 49 | 52 53 54 5f 50 53 45 55 |width[FI|RST_PSEU|
|00001d50| 44 4f 5f 52 45 47 49 53 | 54 45 52 5d 3b 0d 0d 2f |DO_REGIS|TER];../|
|00001d60| 2a 20 49 6e 64 65 78 65 | 64 20 62 79 20 62 61 73 |* Indexe|d by bas|
|00001d70| 69 63 20 62 6c 6f 63 6b | 20 6e 75 6d 62 65 72 2c |ic block| number,|
|00001d80| 20 6e 6f 6e 7a 65 72 6f | 20 69 66 20 74 68 65 72 | nonzero| if ther|
|00001d90| 65 20 69 73 20 61 6e 79 | 20 6e 65 65 64 0d 20 20 |e is any| need. |
|00001da0| 20 66 6f 72 20 61 20 73 | 70 69 6c 6c 20 72 65 67 | for a s|pill reg|
|00001db0| 69 73 74 65 72 20 69 6e | 20 74 68 61 74 20 62 61 |ister in| that ba|
|00001dc0| 73 69 63 20 62 6c 6f 63 | 6b 2e 0d 20 20 20 54 68 |sic bloc|k.. Th|
|00001dd0| 65 20 70 6f 69 6e 74 65 | 72 20 69 73 20 30 20 69 |e pointe|r is 0 i|
|00001de0| 66 20 77 65 20 64 69 64 | 20 73 74 75 70 69 64 20 |f we did| stupid |
|00001df0| 61 6c 6c 6f 63 61 74 69 | 6f 6e 20 61 6e 64 20 64 |allocati|on and d|
|00001e00| 6f 6e 27 74 20 6b 6e 6f | 77 0d 20 20 20 74 68 65 |on't kno|w. the|
|00001e10| 20 73 74 72 75 63 74 75 | 72 65 20 6f 66 20 62 61 | structu|re of ba|
|00001e20| 73 69 63 20 62 6c 6f 63 | 6b 73 2e 20 20 2a 2f 0d |sic bloc|ks. */.|
|00001e30| 0d 63 68 61 72 20 2a 62 | 61 73 69 63 5f 62 6c 6f |.char *b|asic_blo|
|00001e40| 63 6b 5f 6e 65 65 64 73 | 3b 0d 0d 2f 2a 20 46 69 |ck_needs|;../* Fi|
|00001e50| 72 73 74 20 75 69 64 20 | 75 73 65 64 20 62 79 20 |rst uid |used by |
|00001e60| 69 6e 73 6e 73 20 63 72 | 65 61 74 65 64 20 62 79 |insns cr|eated by|
|00001e70| 20 72 65 6c 6f 61 64 20 | 69 6e 20 74 68 69 73 20 | reload |in this |
|00001e80| 66 75 6e 63 74 69 6f 6e | 2e 0d 20 20 20 55 73 65 |function|.. Use|
|00001e90| 64 20 69 6e 20 66 69 6e | 64 5f 65 71 75 69 76 5f |d in fin|d_equiv_|
|00001ea0| 72 65 67 2e 20 20 2a 2f | 0d 69 6e 74 20 72 65 6c |reg. */|.int rel|
|00001eb0| 6f 61 64 5f 66 69 72 73 | 74 5f 75 69 64 3b 0d 0d |oad_firs|t_uid;..|
|00001ec0| 2f 2a 20 46 6c 61 67 20 | 73 65 74 20 62 79 20 6c |/* Flag |set by l|
|00001ed0| 6f 63 61 6c 2d 61 6c 6c | 6f 63 20 6f 72 20 67 6c |ocal-all|oc or gl|
|00001ee0| 6f 62 61 6c 2d 61 6c 6c | 6f 63 20 69 66 20 61 6e |obal-all|oc if an|
|00001ef0| 79 74 68 69 6e 67 20 69 | 73 20 6c 69 76 65 20 69 |ything i|s live i|
|00001f00| 6e 0d 20 20 20 61 20 63 | 61 6c 6c 2d 63 6c 6f 62 |n. a c|all-clob|
|00001f10| 62 65 72 65 64 20 72 65 | 67 20 61 63 72 6f 73 73 |bered re|g across|
|00001f20| 20 63 61 6c 6c 73 2e 20 | 20 2a 2f 0d 0d 69 6e 74 | calls. | */..int|
|00001f30| 20 63 61 6c 6c 65 72 5f | 73 61 76 65 5f 6e 65 65 | caller_|save_nee|
|00001f40| 64 65 64 3b 0d 0d 2f 2a | 20 53 65 74 20 74 6f 20 |ded;../*| Set to |
|00001f50| 31 20 62 79 20 61 6c 74 | 65 72 5f 66 72 61 6d 65 |1 by alt|er_frame|
|00001f60| 5f 70 6f 69 6e 74 65 72 | 5f 61 64 64 72 65 73 73 |_pointer|_address|
|00001f70| 65 73 20 69 66 20 69 74 | 20 63 68 61 6e 67 65 73 |es if it| changes|
|00001f80| 20 61 6e 79 74 68 69 6e | 67 2e 20 20 2a 2f 0d 0d | anythin|g. */..|
|00001f90| 73 74 61 74 69 63 20 69 | 6e 74 20 66 72 61 6d 65 |static i|nt frame|
|00001fa0| 5f 70 6f 69 6e 74 65 72 | 5f 61 64 64 72 65 73 73 |_pointer|_address|
|00001fb0| 5f 61 6c 74 65 72 65 64 | 3b 0d 0d 76 6f 69 64 20 |_altered|;..void |
|00001fc0| 6d 61 72 6b 5f 68 6f 6d | 65 5f 6c 69 76 65 20 28 |mark_hom|e_live (|
|00001fd0| 29 3b 0d 73 74 61 74 69 | 63 20 72 74 78 20 73 63 |);.stati|c rtx sc|
|00001fe0| 61 6e 5f 70 61 72 61 64 | 6f 78 69 63 61 6c 5f 73 |an_parad|oxical_s|
|00001ff0| 75 62 72 65 67 73 20 28 | 29 3b 0d 73 74 61 74 69 |ubregs (|);.stati|
|00002000| 63 20 76 6f 69 64 20 72 | 65 6c 6f 61 64 5f 61 73 |c void r|eload_as|
|00002010| 5f 6e 65 65 64 65 64 20 | 28 29 3b 0d 73 74 61 74 |_needed |();.stat|
|00002020| 69 63 20 69 6e 74 20 6d | 6f 64 65 73 5f 65 71 75 |ic int m|odes_equ|
|00002030| 69 76 5f 66 6f 72 5f 63 | 6c 61 73 73 5f 70 20 28 |iv_for_c|lass_p (|
|00002040| 29 3b 0d 73 74 61 74 69 | 63 20 72 74 78 20 61 6c |);.stati|c rtx al|
|00002050| 74 65 72 5f 66 72 61 6d | 65 5f 70 6f 69 6e 74 65 |ter_fram|e_pointe|
|00002060| 72 5f 61 64 64 72 65 73 | 73 65 73 20 28 29 3b 0d |r_addres|ses ();.|
|00002070| 73 74 61 74 69 63 20 76 | 6f 69 64 20 61 6c 74 65 |static v|oid alte|
|00002080| 72 5f 72 65 67 20 28 29 | 3b 0d 73 74 61 74 69 63 |r_reg ()|;.static|
|00002090| 20 69 6e 74 20 6e 65 77 | 5f 73 70 69 6c 6c 5f 72 | int new|_spill_r|
|000020a0| 65 67 28 29 3b 0d 73 74 | 61 74 69 63 20 69 6e 74 |eg();.st|atic int|
|000020b0| 20 73 70 69 6c 6c 5f 68 | 61 72 64 5f 72 65 67 20 | spill_h|ard_reg |
|000020c0| 28 29 3b 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |();.stat|ic void |
|000020d0| 63 68 6f 6f 73 65 5f 72 | 65 6c 6f 61 64 5f 72 65 |choose_r|eload_re|
|000020e0| 67 73 20 28 29 3b 0d 73 | 74 61 74 69 63 20 76 6f |gs ();.s|tatic vo|
|000020f0| 69 64 20 65 6d 69 74 5f | 72 65 6c 6f 61 64 5f 69 |id emit_|reload_i|
|00002100| 6e 73 6e 73 20 28 29 3b | 0d 73 74 61 74 69 63 20 |nsns ();|.static |
|00002110| 76 6f 69 64 20 64 65 6c | 65 74 65 5f 6f 75 74 70 |void del|ete_outp|
|00002120| 75 74 5f 72 65 6c 6f 61 | 64 20 28 29 3b 0d 73 74 |ut_reloa|d ();.st|
|00002130| 61 74 69 63 20 76 6f 69 | 64 20 66 6f 72 67 65 74 |atic voi|d forget|
|00002140| 5f 6f 6c 64 5f 72 65 6c | 6f 61 64 73 5f 31 20 28 |_old_rel|oads_1 (|
|00002150| 29 3b 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 6f |);.stati|c void o|
|00002160| 72 64 65 72 5f 72 65 67 | 73 5f 66 6f 72 5f 72 65 |rder_reg|s_for_re|
|00002170| 6c 6f 61 64 20 28 29 3b | 0d 73 74 61 74 69 63 20 |load ();|.static |
|00002180| 76 6f 69 64 20 65 6c 69 | 6d 69 6e 61 74 65 5f 66 |void eli|minate_f|
|00002190| 72 61 6d 65 5f 70 6f 69 | 6e 74 65 72 20 28 29 3b |rame_poi|nter ();|
|000021a0| 0d 73 74 61 74 69 63 20 | 72 74 78 20 69 6e 63 5f |.static |rtx inc_|
|000021b0| 66 6f 72 5f 72 65 6c 6f | 61 64 20 28 29 3b 0d 73 |for_relo|ad ();.s|
|000021c0| 74 61 74 69 63 20 69 6e | 74 20 63 6f 6e 73 74 72 |tatic in|t constr|
|000021d0| 61 69 6e 74 5f 61 63 63 | 65 70 74 73 5f 72 65 67 |aint_acc|epts_reg|
|000021e0| 5f 70 20 28 29 3b 0d 73 | 74 61 74 69 63 20 69 6e |_p ();.s|tatic in|
|000021f0| 74 20 63 6f 75 6e 74 5f | 6f 63 63 75 72 72 65 6e |t count_|occurren|
|00002200| 63 65 73 20 28 29 3b 0d | 73 74 61 74 69 63 20 72 |ces ();.|static r|
|00002210| 74 78 20 67 65 6e 5f 69 | 6e 70 75 74 5f 72 65 6c |tx gen_i|nput_rel|
|00002220| 6f 61 64 20 28 29 3b 0d | 0d 65 78 74 65 72 6e 20 |oad ();.|.extern |
|00002230| 76 6f 69 64 20 72 65 6d | 6f 76 65 5f 64 65 61 74 |void rem|ove_deat|
|00002240| 68 20 28 29 3b 0d 65 78 | 74 65 72 6e 20 72 74 78 |h ();.ex|tern rtx|
|00002250| 20 61 64 6a 5f 6f 66 66 | 73 65 74 74 61 62 6c 65 | adj_off|settable|
|00002260| 5f 6f 70 65 72 61 6e 64 | 20 28 29 3b 0d 0c 0d 2f |_operand| ();.../|
|00002270| 2a 20 4d 61 69 6e 20 65 | 6e 74 72 79 20 70 6f 69 |* Main e|ntry poi|
|00002280| 6e 74 20 66 6f 72 20 74 | 68 65 20 72 65 6c 6f 61 |nt for t|he reloa|
|00002290| 64 20 70 61 73 73 2c 20 | 61 6e 64 20 6f 6e 6c 79 |d pass, |and only|
|000022a0| 20 65 6e 74 72 79 20 70 | 6f 69 6e 74 0d 20 20 20 | entry p|oint. |
|000022b0| 69 6e 20 74 68 69 73 20 | 66 69 6c 65 2e 0d 0d 20 |in this |file... |
|000022c0| 20 20 46 49 52 53 54 20 | 69 73 20 74 68 65 20 66 | FIRST |is the f|
|000022d0| 69 72 73 74 20 69 6e 73 | 6e 20 6f 66 20 74 68 65 |irst ins|n of the|
|000022e0| 20 66 75 6e 63 74 69 6f | 6e 20 62 65 69 6e 67 20 | functio|n being |
|000022f0| 63 6f 6d 70 69 6c 65 64 | 2e 0d 0d 20 20 20 47 4c |compiled|... GL|
|00002300| 4f 42 41 4c 20 6e 6f 6e | 7a 65 72 6f 20 6d 65 61 |OBAL non|zero mea|
|00002310| 6e 73 20 77 65 20 77 65 | 72 65 20 63 61 6c 6c 65 |ns we we|re calle|
|00002320| 64 20 66 72 6f 6d 20 67 | 6c 6f 62 61 6c 5f 61 6c |d from g|lobal_al|
|00002330| 6c 6f 63 0d 20 20 20 61 | 6e 64 20 73 68 6f 75 6c |loc. a|nd shoul|
|00002340| 64 20 61 74 74 65 6d 70 | 74 20 74 6f 20 72 65 61 |d attemp|t to rea|
|00002350| 6c 6c 6f 63 61 74 65 20 | 61 6e 79 20 70 73 65 75 |llocate |any pseu|
|00002360| 64 6f 72 65 67 73 20 74 | 68 61 74 20 77 65 0d 20 |doregs t|hat we. |
|00002370| 20 20 64 69 73 70 6c 61 | 63 65 20 66 72 6f 6d 20 | displa|ce from |
|00002380| 68 61 72 64 20 72 65 67 | 73 20 77 65 20 77 69 6c |hard reg|s we wil|
|00002390| 6c 20 75 73 65 20 66 6f | 72 20 72 65 6c 6f 61 64 |l use fo|r reload|
|000023a0| 73 2e 0d 20 20 20 49 66 | 20 47 4c 4f 42 41 4c 20 |s.. If| GLOBAL |
|000023b0| 69 73 20 7a 65 72 6f 2c | 20 77 65 20 64 6f 20 6e |is zero,| we do n|
|000023c0| 6f 74 20 68 61 76 65 20 | 65 6e 6f 75 67 68 20 69 |ot have |enough i|
|000023d0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 74 6f 20 64 6f |nformati|on to do|
|000023e0| 20 74 68 61 74 2c 0d 20 | 20 20 73 6f 20 61 6e 79 | that,. | so any|
|000023f0| 20 70 73 65 75 64 6f 20 | 72 65 67 20 74 68 61 74 | pseudo |reg that|
|00002400| 20 69 73 20 73 70 69 6c | 6c 65 64 20 6d 75 73 74 | is spil|led must|
|00002410| 20 67 6f 20 74 6f 20 74 | 68 65 20 73 74 61 63 6b | go to t|he stack|
|00002420| 2e 0d 0d 20 20 20 44 55 | 4d 50 46 49 4c 45 20 69 |... DU|MPFILE i|
|00002430| 73 20 74 68 65 20 67 6c | 6f 62 61 6c 2d 72 65 67 |s the gl|obal-reg|
|00002440| 20 64 65 62 75 67 67 69 | 6e 67 20 64 75 6d 70 20 | debuggi|ng dump |
|00002450| 66 69 6c 65 20 73 74 72 | 65 61 6d 2c 20 6f 72 20 |file str|eam, or |
|00002460| 30 2e 0d 20 20 20 49 66 | 20 69 74 20 69 73 20 6e |0.. If| it is n|
|00002470| 6f 6e 7a 65 72 6f 2c 20 | 6d 65 73 73 61 67 65 73 |onzero, |messages|
|00002480| 20 61 72 65 20 77 72 69 | 74 74 65 6e 20 74 6f 20 | are wri|tten to |
|00002490| 69 74 20 74 6f 20 64 65 | 73 63 72 69 62 65 0d 20 |it to de|scribe. |
|000024a0| 20 20 77 68 69 63 68 20 | 72 65 67 69 73 74 65 72 | which |register|
|000024b0| 73 20 61 72 65 20 73 65 | 69 7a 65 64 20 61 73 20 |s are se|ized as |
|000024c0| 72 65 6c 6f 61 64 20 72 | 65 67 73 2c 20 77 68 69 |reload r|egs, whi|
|000024d0| 63 68 20 70 73 65 75 64 | 6f 20 72 65 67 73 0d 20 |ch pseud|o regs. |
|000024e0| 20 20 61 72 65 20 73 70 | 69 6c 6c 65 64 20 66 72 | are sp|illed fr|
|000024f0| 6f 6d 20 74 68 65 6d 2c | 20 61 6e 64 20 77 68 65 |om them,| and whe|
|00002500| 72 65 20 74 68 65 20 70 | 73 65 75 64 6f 20 72 65 |re the p|seudo re|
|00002510| 67 73 20 61 72 65 20 72 | 65 61 6c 6c 6f 63 61 74 |gs are r|eallocat|
|00002520| 65 64 20 74 6f 2e 20 20 | 2a 2f 0d 0d 76 6f 69 64 |ed to. |*/..void|
|00002530| 0d 72 65 6c 6f 61 64 20 | 28 66 69 72 73 74 2c 20 |.reload |(first, |
|00002540| 67 6c 6f 62 61 6c 2c 20 | 64 75 6d 70 66 69 6c 65 |global, |dumpfile|
|00002550| 29 0d 20 20 20 20 20 72 | 74 78 20 66 69 72 73 74 |). r|tx first|
|00002560| 3b 0d 20 20 20 20 20 69 | 6e 74 20 67 6c 6f 62 61 |;. i|nt globa|
|00002570| 6c 3b 0d 20 20 20 20 20 | 46 49 4c 45 20 2a 64 75 |l;. |FILE *du|
|00002580| 6d 70 66 69 6c 65 3b 0d | 7b 0d 20 20 72 65 67 69 |mpfile;.|{. regi|
|00002590| 73 74 65 72 20 69 6e 74 | 20 63 6c 61 73 73 3b 0d |ster int| class;.|
|000025a0| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 69 | regist|er int i|
|000025b0| 3b 0d 20 20 72 65 67 69 | 73 74 65 72 20 72 74 78 |;. regi|ster rtx|
|000025c0| 20 69 6e 73 6e 3b 0d 0d | 20 20 69 6e 74 20 73 6f | insn;..| int so|
|000025d0| 6d 65 74 68 69 6e 67 5f | 63 68 61 6e 67 65 64 3b |mething_|changed;|
|000025e0| 0d 20 20 69 6e 74 20 73 | 6f 6d 65 74 68 69 6e 67 |. int s|omething|
|000025f0| 5f 6e 65 65 64 73 5f 72 | 65 6c 6f 61 64 73 3b 0d |_needs_r|eloads;.|
|00002600| 20 20 69 6e 74 20 6e 65 | 77 5f 62 61 73 69 63 5f | int ne|w_basic_|
|00002610| 62 6c 6f 63 6b 5f 6e 65 | 65 64 73 3b 0d 0d 20 20 |block_ne|eds;.. |
|00002620| 2f 2a 20 54 68 65 20 62 | 61 73 69 63 20 62 6c 6f |/* The b|asic blo|
|00002630| 63 6b 20 6e 75 6d 62 65 | 72 20 63 75 72 72 65 6e |ck numbe|r curren|
|00002640| 74 6c 79 20 62 65 69 6e | 67 20 70 72 6f 63 65 73 |tly bein|g proces|
|00002650| 73 65 64 20 66 6f 72 20 | 49 4e 53 4e 2e 20 20 2a |sed for |INSN. *|
|00002660| 2f 0d 20 20 69 6e 74 20 | 74 68 69 73 5f 62 6c 6f |/. int |this_blo|
|00002670| 63 6b 3b 0d 0d 20 20 2f | 2a 20 4f 66 74 65 6e 20 |ck;.. /|* Often |
|00002680| 28 4d 45 4d 20 28 52 45 | 47 20 6e 29 29 20 69 73 |(MEM (RE|G n)) is|
|00002690| 20 73 74 69 6c 6c 20 76 | 61 6c 69 64 20 65 76 65 | still v|alid eve|
|000026a0| 6e 20 69 66 20 28 52 45 | 47 20 6e 29 20 69 73 20 |n if (RE|G n) is |
|000026b0| 70 75 74 20 6f 6e 20 74 | 68 65 20 73 74 61 63 6b |put on t|he stack|
|000026c0| 2e 0d 20 20 20 20 20 53 | 65 74 20 73 70 69 6c 6c |.. S|et spill|
|000026d0| 5f 69 6e 64 69 72 65 63 | 74 5f 6f 6b 20 69 66 20 |_indirec|t_ok if |
|000026e0| 73 6f 2e 20 20 2a 2f 0d | 20 20 72 65 67 69 73 74 |so. */.| regist|
|000026f0| 65 72 20 72 74 78 20 74 | 65 6d 0d 20 20 20 20 3d |er rtx t|em. =|
|00002700| 20 67 65 6e 5f 72 74 78 | 20 28 4d 45 4d 2c 20 50 | gen_rtx| (MEM, P|
|00002710| 6d 6f 64 65 2c 0d 09 20 | 20 20 20 20 20 20 67 65 |mode,.. | ge|
|00002720| 6e 5f 72 74 78 20 28 50 | 4c 55 53 2c 20 50 6d 6f |n_rtx (P|LUS, Pmo|
|00002730| 64 65 2c 0d 09 09 09 67 | 65 6e 5f 72 74 78 20 28 |de,....g|en_rtx (|
|00002740| 52 45 47 2c 20 50 6d 6f | 64 65 2c 20 46 52 41 4d |REG, Pmo|de, FRAM|
|00002750| 45 5f 50 4f 49 4e 54 45 | 52 5f 52 45 47 4e 55 4d |E_POINTE|R_REGNUM|
|00002760| 29 2c 0d 09 09 09 67 65 | 6e 5f 72 74 78 20 28 43 |),....ge|n_rtx (C|
|00002770| 4f 4e 53 54 5f 49 4e 54 | 2c 20 56 4f 49 44 6d 6f |ONST_INT|, VOIDmo|
|00002780| 64 65 2c 20 34 29 29 29 | 3b 0d 0d 20 20 73 70 69 |de, 4)))|;.. spi|
|00002790| 6c 6c 5f 69 6e 64 69 72 | 65 63 74 5f 6f 6b 20 3d |ll_indir|ect_ok =|
|000027a0| 20 6d 65 6d 6f 72 79 5f | 61 64 64 72 65 73 73 5f | memory_|address_|
|000027b0| 70 20 28 51 49 6d 6f 64 | 65 2c 20 74 65 6d 29 3b |p (QImod|e, tem);|
|000027c0| 0d 0d 20 20 74 65 6d 20 | 3d 20 67 65 6e 5f 72 74 |.. tem |= gen_rt|
|000027d0| 78 20 28 50 4c 55 53 2c | 20 50 6d 6f 64 65 2c 20 |x (PLUS,| Pmode, |
|000027e0| 0d 09 09 20 67 65 6e 5f | 72 74 78 20 28 52 45 47 |... gen_|rtx (REG|
|000027f0| 2c 20 50 6d 6f 64 65 2c | 20 46 52 41 4d 45 5f 50 |, Pmode,| FRAME_P|
|00002800| 4f 49 4e 54 45 52 5f 52 | 45 47 4e 55 4d 29 2c 0d |OINTER_R|EGNUM),.|
|00002810| 09 09 20 67 65 6e 5f 72 | 74 78 20 28 52 45 47 2c |.. gen_r|tx (REG,|
|00002820| 20 50 6d 6f 64 65 2c 20 | 46 52 41 4d 45 5f 50 4f | Pmode, |FRAME_PO|
|00002830| 49 4e 54 45 52 5f 52 45 | 47 4e 55 4d 29 29 3b 0d |INTER_RE|GNUM));.|
|00002840| 20 20 2f 2a 20 54 68 69 | 73 20 77 61 79 2c 20 77 | /* Thi|s way, w|
|00002850| 65 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |e make s|ure that|
|00002860| 20 72 65 67 2b 72 65 67 | 20 69 73 20 61 6e 20 6f | reg+reg| is an o|
|00002870| 66 66 73 65 74 74 61 62 | 6c 65 20 61 64 64 72 65 |ffsettab|le addre|
|00002880| 73 73 2e 20 20 2a 2f 0d | 20 20 74 65 6d 20 3d 20 |ss. */.| tem = |
|00002890| 70 6c 75 73 5f 63 6f 6e | 73 74 61 6e 74 20 28 74 |plus_con|stant (t|
|000028a0| 65 6d 2c 20 34 29 3b 0d | 0d 20 20 64 6f 75 62 6c |em, 4);.|. doubl|
|000028b0| 65 5f 72 65 67 5f 61 64 | 64 72 65 73 73 5f 6f 6b |e_reg_ad|dress_ok|
|000028c0| 20 3d 20 6d 65 6d 6f 72 | 79 5f 61 64 64 72 65 73 | = memor|y_addres|
|000028d0| 73 5f 70 20 28 51 49 6d | 6f 64 65 2c 20 74 65 6d |s_p (QIm|ode, tem|
|000028e0| 29 3b 0d 0d 20 20 2f 2a | 20 45 6e 61 62 6c 65 20 |);.. /*| Enable |
|000028f0| 66 69 6e 64 5f 65 71 75 | 69 76 5f 72 65 67 20 74 |find_equ|iv_reg t|
|00002900| 6f 20 64 69 73 74 69 6e | 67 75 69 73 68 20 69 6e |o distin|guish in|
|00002910| 73 6e 73 20 6d 61 64 65 | 20 62 79 20 72 65 6c 6f |sns made| by relo|
|00002920| 61 64 2e 20 20 2a 2f 0d | 20 20 72 65 6c 6f 61 64 |ad. */.| reload|
|00002930| 5f 66 69 72 73 74 5f 75 | 69 64 20 3d 20 67 65 74 |_first_u|id = get|
|00002940| 5f 6d 61 78 5f 75 69 64 | 20 28 29 3b 0d 0d 20 20 |_max_uid| ();.. |
|00002950| 62 61 73 69 63 5f 62 6c | 6f 63 6b 5f 6e 65 65 64 |basic_bl|ock_need|
|00002960| 73 20 3d 20 30 3b 0d 0d | 20 20 2f 2a 20 52 65 6d |s = 0;..| /* Rem|
|00002970| 65 6d 62 65 72 20 77 68 | 69 63 68 20 68 61 72 64 |ember wh|ich hard|
|00002980| 20 72 65 67 73 20 61 70 | 70 65 61 72 20 65 78 70 | regs ap|pear exp|
|00002990| 6c 69 63 69 74 6c 79 0d | 20 20 20 20 20 62 65 66 |licitly.| bef|
|000029a0| 6f 72 65 20 77 65 20 6d | 65 72 67 65 20 69 6e 74 |ore we m|erge int|
|000029b0| 6f 20 60 72 65 67 73 5f | 65 76 65 72 5f 6c 69 76 |o `regs_|ever_liv|
|000029c0| 65 27 20 74 68 65 20 6f | 6e 65 73 20 69 6e 20 77 |e' the o|nes in w|
|000029d0| 68 69 63 68 0d 20 20 20 | 20 20 70 73 65 75 64 6f |hich. | pseudo|
|000029e0| 20 72 65 67 73 20 68 61 | 76 65 20 62 65 65 6e 20 | regs ha|ve been |
|000029f0| 61 6c 6c 6f 63 61 74 65 | 64 2e 20 20 2a 2f 0d 20 |allocate|d. */. |
|00002a00| 20 62 63 6f 70 79 20 28 | 72 65 67 73 5f 65 76 65 | bcopy (|regs_eve|
|00002a10| 72 5f 6c 69 76 65 2c 20 | 72 65 67 73 5f 65 78 70 |r_live, |regs_exp|
|00002a20| 6c 69 63 69 74 6c 79 5f | 75 73 65 64 2c 20 73 69 |licitly_|used, si|
|00002a30| 7a 65 6f 66 20 72 65 67 | 73 5f 65 76 65 72 5f 6c |zeof reg|s_ever_l|
|00002a40| 69 76 65 29 3b 0d 0d 20 | 20 2f 2a 20 57 65 20 64 |ive);.. | /* We d|
|00002a50| 6f 6e 27 74 20 68 61 76 | 65 20 61 20 73 74 61 63 |on't hav|e a stac|
|00002a60| 6b 20 73 6c 6f 74 20 66 | 6f 72 20 61 6e 79 20 73 |k slot f|or any s|
|00002a70| 70 69 6c 6c 20 72 65 67 | 20 79 65 74 2e 20 20 2a |pill reg| yet. *|
|00002a80| 2f 0d 20 20 62 7a 65 72 | 6f 20 28 73 70 69 6c 6c |/. bzer|o (spill|
|00002a90| 5f 73 74 61 63 6b 5f 73 | 6c 6f 74 2c 20 73 69 7a |_stack_s|lot, siz|
|00002aa0| 65 6f 66 20 73 70 69 6c | 6c 5f 73 74 61 63 6b 5f |eof spil|l_stack_|
|00002ab0| 73 6c 6f 74 29 3b 0d 20 | 20 62 7a 65 72 6f 20 28 |slot);. | bzero (|
|00002ac0| 73 70 69 6c 6c 5f 73 74 | 61 63 6b 5f 73 6c 6f 74 |spill_st|ack_slot|
|00002ad0| 5f 77 69 64 74 68 2c 20 | 73 69 7a 65 6f 66 20 73 |_width, |sizeof s|
|00002ae0| 70 69 6c 6c 5f 73 74 61 | 63 6b 5f 73 6c 6f 74 5f |pill_sta|ck_slot_|
|00002af0| 77 69 64 74 68 29 3b 0d | 0d 20 20 2f 2a 20 43 6f |width);.|. /* Co|
|00002b00| 6d 70 75 74 65 20 77 68 | 69 63 68 20 68 61 72 64 |mpute wh|ich hard|
|00002b10| 20 72 65 67 69 73 74 65 | 72 73 20 61 72 65 20 6e | registe|rs are n|
|00002b20| 6f 77 20 69 6e 20 75 73 | 65 0d 20 20 20 20 20 61 |ow in us|e. a|
|00002b30| 73 20 68 6f 6d 65 73 20 | 66 6f 72 20 70 73 65 75 |s homes |for pseu|
|00002b40| 64 6f 20 72 65 67 69 73 | 74 65 72 73 2e 0d 20 20 |do regis|ters.. |
|00002b50| 20 20 20 54 68 69 73 20 | 69 73 20 64 6f 6e 65 20 | This |is done |
|00002b60| 68 65 72 65 20 72 61 74 | 68 65 72 20 74 68 61 6e |here rat|her than|
|00002b70| 20 28 65 67 29 20 69 6e | 20 67 6c 6f 62 61 6c 5f | (eg) in| global_|
|00002b80| 61 6c 6c 6f 63 0d 20 20 | 20 20 20 62 65 63 61 75 |alloc. | becau|
|00002b90| 73 65 20 74 68 69 73 20 | 70 6f 69 6e 74 20 69 73 |se this |point is|
|00002ba0| 20 72 65 61 63 68 65 64 | 20 65 76 65 6e 20 69 66 | reached| even if|
|00002bb0| 20 6e 6f 74 20 6f 70 74 | 69 6d 69 7a 69 6e 67 2e | not opt|imizing.|
|00002bc0| 20 20 2a 2f 0d 0d 20 20 | 66 6f 72 20 28 69 20 3d | */.. |for (i =|
|00002bd0| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|00002be0| 47 49 53 54 45 52 3b 20 | 69 20 3c 20 6d 61 78 5f |GISTER; |i < max_|
|00002bf0| 72 65 67 6e 6f 3b 20 69 | 2b 2b 29 0d 20 20 20 20 |regno; i|++). |
|00002c00| 6d 61 72 6b 5f 68 6f 6d | 65 5f 6c 69 76 65 20 28 |mark_hom|e_live (|
|00002c10| 69 29 3b 0d 0d 20 20 2f | 2a 20 4d 61 6b 65 20 73 |i);.. /|* Make s|
|00002c20| 75 72 65 20 74 68 61 74 | 20 74 68 65 20 6c 61 73 |ure that| the las|
|00002c30| 74 20 69 6e 73 6e 20 69 | 6e 20 74 68 65 20 63 68 |t insn i|n the ch|
|00002c40| 61 69 6e 0d 20 20 20 20 | 20 69 73 20 6e 6f 74 20 |ain. | is not |
|00002c50| 73 6f 6d 65 74 68 69 6e | 67 20 74 68 61 74 20 6e |somethin|g that n|
|00002c60| 65 65 64 73 20 72 65 6c | 6f 61 64 69 6e 67 2e 20 |eeds rel|oading. |
|00002c70| 20 2a 2f 0d 20 20 65 6d | 69 74 5f 6e 6f 74 65 20 | */. em|it_note |
|00002c80| 28 30 2c 20 4e 4f 54 45 | 5f 49 4e 53 4e 5f 44 45 |(0, NOTE|_INSN_DE|
|00002c90| 4c 45 54 45 44 29 3b 0d | 0d 20 20 2f 2a 20 46 69 |LETED);.|. /* Fi|
|00002ca0| 6e 64 20 61 6c 6c 20 74 | 68 65 20 70 73 65 75 64 |nd all t|he pseud|
|00002cb0| 6f 20 72 65 67 69 73 74 | 65 72 73 20 74 68 61 74 |o regist|ers that|
|00002cc0| 20 64 69 64 6e 27 74 20 | 67 65 74 20 68 61 72 64 | didn't |get hard|
|00002cd0| 20 72 65 67 73 0d 20 20 | 20 20 20 62 75 74 20 64 | regs. | but d|
|00002ce0| 6f 20 68 61 76 65 20 6b | 6e 6f 77 6e 20 65 71 75 |o have k|nown equ|
|00002cf0| 69 76 61 6c 65 6e 74 20 | 63 6f 6e 73 74 61 6e 74 |ivalent |constant|
|00002d00| 73 20 6f 72 20 6d 65 6d | 6f 72 79 20 73 6c 6f 74 |s or mem|ory slot|
|00002d10| 73 2e 0d 20 20 20 20 20 | 54 68 65 73 65 20 69 6e |s.. |These in|
|00002d20| 63 6c 75 64 65 20 70 61 | 72 61 6d 65 74 65 72 73 |clude pa|rameters|
|00002d30| 20 28 6b 6e 6f 77 6e 20 | 65 71 75 69 76 61 6c 65 | (known |equivale|
|00002d40| 6e 74 20 74 6f 20 70 61 | 72 61 6d 65 74 65 72 20 |nt to pa|rameter |
|00002d50| 73 6c 6f 74 73 29 0d 20 | 20 20 20 20 61 6e 64 20 |slots). | and |
|00002d60| 63 73 65 27 64 20 6f 72 | 20 6c 6f 6f 70 2d 6d 6f |cse'd or| loop-mo|
|00002d70| 76 65 64 20 63 6f 6e 73 | 74 61 6e 74 20 6d 65 6d |ved cons|tant mem|
|00002d80| 6f 72 79 20 61 64 64 72 | 65 73 73 65 73 2e 0d 0d |ory addr|esses...|
|00002d90| 20 20 20 20 20 52 65 63 | 6f 72 64 20 63 6f 6e 73 | Rec|ord cons|
|00002da0| 74 61 6e 74 20 65 71 75 | 69 76 61 6c 65 6e 74 73 |tant equ|ivalents|
|00002db0| 20 69 6e 20 72 65 67 5f | 65 71 75 69 76 5f 63 6f | in reg_|equiv_co|
|00002dc0| 6e 73 74 61 6e 74 0d 20 | 20 20 20 20 73 6f 20 74 |nstant. | so t|
|00002dd0| 68 65 79 20 77 69 6c 6c | 20 62 65 20 73 75 62 73 |hey will| be subs|
|00002de0| 74 69 74 75 74 65 64 20 | 62 79 20 66 69 6e 64 5f |tituted |by find_|
|00002df0| 72 65 6c 6f 61 64 73 2e | 0d 20 20 20 20 20 52 65 |reloads.|. Re|
|00002e00| 63 6f 72 64 20 6d 65 6d | 6f 72 79 20 65 71 75 69 |cord mem|ory equi|
|00002e10| 76 61 6c 65 6e 74 73 20 | 69 6e 20 72 65 67 5f 6d |valents |in reg_m|
|00002e20| 65 6d 5f 65 71 75 69 76 | 20 73 6f 20 74 68 65 79 |em_equiv| so they|
|00002e30| 20 63 61 6e 0d 20 20 20 | 20 20 62 65 20 73 75 62 | can. | be sub|
|00002e40| 73 74 69 74 75 74 65 64 | 20 65 76 65 6e 74 75 61 |stituted| eventua|
|00002e50| 6c 6c 79 20 62 79 20 61 | 6c 74 65 72 69 6e 67 20 |lly by a|ltering |
|00002e60| 74 68 65 20 52 45 47 2d | 72 74 78 27 73 2e 20 20 |the REG-|rtx's. |
|00002e70| 2a 2f 0d 0d 20 20 72 65 | 67 5f 65 71 75 69 76 5f |*/.. re|g_equiv_|
|00002e80| 63 6f 6e 73 74 61 6e 74 | 20 3d 20 28 72 74 78 20 |constant| = (rtx |
|00002e90| 2a 29 20 61 6c 6c 6f 63 | 61 20 28 6d 61 78 5f 72 |*) alloc|a (max_r|
|00002ea0| 65 67 6e 6f 20 2a 20 73 | 69 7a 65 6f 66 20 28 72 |egno * s|izeof (r|
|00002eb0| 74 78 29 29 3b 0d 20 20 | 62 7a 65 72 6f 20 28 72 |tx));. |bzero (r|
|00002ec0| 65 67 5f 65 71 75 69 76 | 5f 63 6f 6e 73 74 61 6e |eg_equiv|_constan|
|00002ed0| 74 2c 20 6d 61 78 5f 72 | 65 67 6e 6f 20 2a 20 73 |t, max_r|egno * s|
|00002ee0| 69 7a 65 6f 66 20 28 72 | 74 78 29 29 3b 0d 20 20 |izeof (r|tx));. |
|00002ef0| 72 65 67 5f 65 71 75 69 | 76 5f 6d 65 6d 20 3d 20 |reg_equi|v_mem = |
|00002f00| 28 72 74 78 20 2a 29 20 | 61 6c 6c 6f 63 61 20 28 |(rtx *) |alloca (|
|00002f10| 6d 61 78 5f 72 65 67 6e | 6f 20 2a 20 73 69 7a 65 |max_regn|o * size|
|00002f20| 6f 66 20 28 72 74 78 29 | 29 3b 0d 20 20 62 7a 65 |of (rtx)|);. bze|
|00002f30| 72 6f 20 28 72 65 67 5f | 65 71 75 69 76 5f 6d 65 |ro (reg_|equiv_me|
|00002f40| 6d 2c 20 6d 61 78 5f 72 | 65 67 6e 6f 20 2a 20 73 |m, max_r|egno * s|
|00002f50| 69 7a 65 6f 66 20 28 72 | 74 78 29 29 3b 0d 20 20 |izeof (r|tx));. |
|00002f60| 72 65 67 5f 65 71 75 69 | 76 5f 69 6e 69 74 20 3d |reg_equi|v_init =|
|00002f70| 20 28 72 74 78 20 2a 29 | 20 61 6c 6c 6f 63 61 20 | (rtx *)| alloca |
|00002f80| 28 6d 61 78 5f 72 65 67 | 6e 6f 20 2a 20 73 69 7a |(max_reg|no * siz|
|00002f90| 65 6f 66 20 28 72 74 78 | 29 29 3b 0d 20 20 62 7a |eof (rtx|));. bz|
|00002fa0| 65 72 6f 20 28 72 65 67 | 5f 65 71 75 69 76 5f 69 |ero (reg|_equiv_i|
|00002fb0| 6e 69 74 2c 20 6d 61 78 | 5f 72 65 67 6e 6f 20 2a |nit, max|_regno *|
|00002fc0| 20 73 69 7a 65 6f 66 20 | 28 72 74 78 29 29 3b 0d | sizeof |(rtx));.|
|00002fd0| 20 20 72 65 67 5f 65 71 | 75 69 76 5f 61 64 64 72 | reg_eq|uiv_addr|
|00002fe0| 65 73 73 20 3d 20 28 72 | 74 78 20 2a 29 20 61 6c |ess = (r|tx *) al|
|00002ff0| 6c 6f 63 61 20 28 6d 61 | 78 5f 72 65 67 6e 6f 20 |loca (ma|x_regno |
|00003000| 2a 20 73 69 7a 65 6f 66 | 20 28 72 74 78 29 29 3b |* sizeof| (rtx));|
|00003010| 0d 20 20 62 7a 65 72 6f | 20 28 72 65 67 5f 65 71 |. bzero| (reg_eq|
|00003020| 75 69 76 5f 61 64 64 72 | 65 73 73 2c 20 6d 61 78 |uiv_addr|ess, max|
|00003030| 5f 72 65 67 6e 6f 20 2a | 20 73 69 7a 65 6f 66 20 |_regno *| sizeof |
|00003040| 28 72 74 78 29 29 3b 0d | 20 20 72 65 67 5f 6d 61 |(rtx));.| reg_ma|
|00003050| 78 5f 72 65 66 5f 77 69 | 64 74 68 20 3d 20 28 69 |x_ref_wi|dth = (i|
|00003060| 6e 74 20 2a 29 20 61 6c | 6c 6f 63 61 20 28 6d 61 |nt *) al|loca (ma|
|00003070| 78 5f 72 65 67 6e 6f 20 | 2a 20 73 69 7a 65 6f 66 |x_regno |* sizeof|
|00003080| 20 28 69 6e 74 29 29 3b | 0d 20 20 62 7a 65 72 6f | (int));|. bzero|
|00003090| 20 28 72 65 67 5f 6d 61 | 78 5f 72 65 66 5f 77 69 | (reg_ma|x_ref_wi|
|000030a0| 64 74 68 2c 20 6d 61 78 | 5f 72 65 67 6e 6f 20 2a |dth, max|_regno *|
|000030b0| 20 73 69 7a 65 6f 66 20 | 28 69 6e 74 29 29 3b 0d | sizeof |(int));.|
|000030c0| 0d 20 20 2f 2a 20 4c 6f | 6f 6b 20 66 6f 72 20 52 |. /* Lo|ok for R|
|000030d0| 45 47 5f 45 51 55 49 56 | 20 6e 6f 74 65 73 3b 20 |EG_EQUIV| notes; |
|000030e0| 72 65 63 6f 72 64 20 77 | 68 61 74 20 65 61 63 68 |record w|hat each|
|000030f0| 20 70 73 65 75 64 6f 20 | 69 73 20 65 71 75 69 76 | pseudo |is equiv|
|00003100| 61 6c 65 6e 74 20 74 6f | 2e 0d 20 20 20 20 20 41 |alent to|.. A|
|00003110| 6c 73 6f 20 66 69 6e 64 | 20 61 6c 6c 20 70 61 72 |lso find| all par|
|00003120| 61 64 6f 78 69 63 61 6c | 20 73 75 62 72 65 67 73 |adoxical| subregs|
|00003130| 0d 20 20 20 20 20 61 6e | 64 20 66 69 6e 64 20 6c |. an|d find l|
|00003140| 61 72 67 65 73 74 20 73 | 75 63 68 20 66 6f 72 20 |argest s|uch for |
|00003150| 65 61 63 68 20 70 73 65 | 75 64 6f 2e 20 20 2a 2f |each pse|udo. */|
|00003160| 0d 0d 20 20 66 6f 72 20 | 28 69 6e 73 6e 20 3d 20 |.. for |(insn = |
|00003170| 66 69 72 73 74 3b 20 69 | 6e 73 6e 3b 20 69 6e 73 |first; i|nsn; ins|
|00003180| 6e 20 3d 20 4e 45 58 54 | 5f 49 4e 53 4e 20 28 69 |n = NEXT|_INSN (i|
|00003190| 6e 73 6e 29 29 0d 20 20 | 20 20 7b 0d 20 20 20 20 |nsn)). | {. |
|000031a0| 20 20 69 66 20 28 47 45 | 54 5f 43 4f 44 45 20 28 | if (GE|T_CODE (|
|000031b0| 69 6e 73 6e 29 20 3d 3d | 20 49 4e 53 4e 0d 09 20 |insn) ==| INSN.. |
|000031c0| 20 26 26 20 47 45 54 5f | 43 4f 44 45 20 28 50 41 | && GET_|CODE (PA|
|000031d0| 54 54 45 52 4e 20 28 69 | 6e 73 6e 29 29 20 3d 3d |TTERN (i|nsn)) ==|
|000031e0| 20 53 45 54 0d 09 20 20 | 26 26 20 47 45 54 5f 43 | SET.. |&& GET_C|
|000031f0| 4f 44 45 20 28 53 45 54 | 5f 44 45 53 54 20 28 50 |ODE (SET|_DEST (P|
|00003200| 41 54 54 45 52 4e 20 28 | 69 6e 73 6e 29 29 29 20 |ATTERN (|insn))) |
|00003210| 3d 3d 20 52 45 47 29 0d | 09 7b 0d 09 20 20 72 74 |== REG).|.{.. rt|
|00003220| 78 20 6e 6f 74 65 20 3d | 20 66 69 6e 64 5f 72 65 |x note =| find_re|
|00003230| 67 5f 6e 6f 74 65 20 28 | 69 6e 73 6e 2c 20 52 45 |g_note (|insn, RE|
|00003240| 47 5f 45 51 55 49 56 2c | 20 30 29 3b 0d 09 20 20 |G_EQUIV,| 0);.. |
|00003250| 69 66 20 28 6e 6f 74 65 | 29 0d 09 20 20 20 20 7b |if (note|).. {|
|00003260| 0d 09 20 20 20 20 20 20 | 72 74 78 20 78 20 3d 20 |.. |rtx x = |
|00003270| 58 45 58 50 20 28 6e 6f | 74 65 2c 20 30 29 3b 0d |XEXP (no|te, 0);.|
|00003280| 09 20 20 20 20 20 20 69 | 20 3d 20 52 45 47 4e 4f |. i| = REGNO|
|00003290| 20 28 53 45 54 5f 44 45 | 53 54 20 28 50 41 54 54 | (SET_DE|ST (PATT|
|000032a0| 45 52 4e 20 28 69 6e 73 | 6e 29 29 29 3b 0d 09 20 |ERN (ins|n)));.. |
|000032b0| 20 20 20 20 20 69 66 20 | 28 69 20 3e 3d 20 46 49 | if |(i >= FI|
|000032c0| 52 53 54 5f 50 53 45 55 | 44 4f 5f 52 45 47 49 53 |RST_PSEU|DO_REGIS|
|000032d0| 54 45 52 29 0d 09 09 7b | 0d 09 09 20 20 69 66 20 |TER)...{|... if |
|000032e0| 28 47 45 54 5f 43 4f 44 | 45 20 28 78 29 20 3d 3d |(GET_COD|E (x) ==|
|000032f0| 20 4d 45 4d 29 0d 09 09 | 20 20 20 20 7b 0d 09 09 | MEM)...| {...|
|00003300| 20 20 20 20 20 20 69 66 | 20 28 6d 65 6d 6f 72 79 | if| (memory|
|00003310| 5f 61 64 64 72 65 73 73 | 5f 70 20 28 47 45 54 5f |_address|_p (GET_|
|00003320| 4d 4f 44 45 20 28 78 29 | 2c 20 58 45 58 50 20 28 |MODE (x)|, XEXP (|
|00003330| 78 2c 20 30 29 29 29 0d | 09 09 09 72 65 67 5f 65 |x, 0))).|...reg_e|
|00003340| 71 75 69 76 5f 6d 65 6d | 5b 69 5d 20 3d 20 78 3b |quiv_mem|[i] = x;|
|00003350| 0d 09 09 20 20 20 20 20 | 20 65 6c 73 65 0d 09 09 |... | else...|
|00003360| 09 72 65 67 5f 65 71 75 | 69 76 5f 61 64 64 72 65 |.reg_equ|iv_addre|
|00003370| 73 73 5b 69 5d 20 3d 20 | 58 45 58 50 20 28 78 2c |ss[i] = |XEXP (x,|
|00003380| 20 30 29 3b 0d 09 09 20 | 20 20 20 7d 0d 09 09 20 | 0);... | }... |
|00003390| 20 65 6c 73 65 20 69 66 | 20 28 69 6d 6d 65 64 69 | else if| (immedi|
|000033a0| 61 74 65 5f 6f 70 65 72 | 61 6e 64 20 28 78 2c 20 |ate_oper|and (x, |
|000033b0| 56 4f 49 44 6d 6f 64 65 | 29 29 0d 09 09 20 20 20 |VOIDmode|))... |
|000033c0| 20 72 65 67 5f 65 71 75 | 69 76 5f 63 6f 6e 73 74 | reg_equ|iv_const|
|000033d0| 61 6e 74 5b 69 5d 20 3d | 20 78 3b 0d 09 09 20 20 |ant[i] =| x;... |
|000033e0| 65 6c 73 65 0d 09 09 20 | 20 20 20 63 6f 6e 74 69 |else... | conti|
|000033f0| 6e 75 65 3b 0d 09 09 20 | 20 72 65 67 5f 65 71 75 |nue;... | reg_equ|
|00003400| 69 76 5f 69 6e 69 74 5b | 69 5d 20 3d 20 69 6e 73 |iv_init[|i] = ins|
|00003410| 6e 3b 0d 09 09 7d 0d 09 | 20 20 20 20 7d 0d 09 7d |n;...}..| }..}|
|00003420| 0d 20 20 20 20 20 20 69 | 66 20 28 47 45 54 5f 43 |. i|f (GET_C|
|00003430| 4f 44 45 20 28 69 6e 73 | 6e 29 20 3d 3d 20 49 4e |ODE (ins|n) == IN|
|00003440| 53 4e 20 7c 7c 20 47 45 | 54 5f 43 4f 44 45 20 28 |SN || GE|T_CODE (|
|00003450| 69 6e 73 6e 29 20 3d 3d | 20 43 41 4c 4c 5f 49 4e |insn) ==| CALL_IN|
|00003460| 53 4e 0d 09 20 20 7c 7c | 20 47 45 54 5f 43 4f 44 |SN.. ||| GET_COD|
|00003470| 45 20 28 69 6e 73 6e 29 | 20 3d 3d 20 4a 55 4d 50 |E (insn)| == JUMP|
|00003480| 5f 49 4e 53 4e 29 0d 09 | 73 63 61 6e 5f 70 61 72 |_INSN)..|scan_par|
|00003490| 61 64 6f 78 69 63 61 6c | 5f 73 75 62 72 65 67 73 |adoxical|_subregs|
|000034a0| 20 28 50 41 54 54 45 52 | 4e 20 28 69 6e 73 6e 29 | (PATTER|N (insn)|
|000034b0| 29 3b 0d 20 20 20 20 7d | 0d 0d 20 20 2f 2a 20 44 |);. }|.. /* D|
|000034c0| 6f 65 73 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |oes this| functio|
|000034d0| 6e 20 72 65 71 75 69 72 | 65 20 61 20 66 72 61 6d |n requir|e a fram|
|000034e0| 65 20 70 6f 69 6e 74 65 | 72 3f 20 20 2a 2f 0d 0d |e pointe|r? */..|
|000034f0| 20 20 66 72 61 6d 65 5f | 70 6f 69 6e 74 65 72 5f | frame_|pointer_|
|00003500| 6e 65 65 64 65 64 0d 20 | 20 20 20 7c 3d 20 28 21 |needed. | |= (!|
|00003510| 20 67 6c 6f 62 61 6c 20 | 7c 7c 20 46 52 41 4d 45 | global ||| FRAME|
|00003520| 5f 50 4f 49 4e 54 45 52 | 5f 52 45 51 55 49 52 45 |_POINTER|_REQUIRE|
|00003530| 44 29 3b 0d 0d 20 20 69 | 66 20 28 21 20 66 72 61 |D);.. i|f (! fra|
|00003540| 6d 65 5f 70 6f 69 6e 74 | 65 72 5f 6e 65 65 64 65 |me_point|er_neede|
|00003550| 64 29 0d 20 20 20 20 66 | 72 61 6d 65 5f 70 6f 69 |d). f|rame_poi|
|00003560| 6e 74 65 72 5f 6e 65 65 | 64 65 64 0d 20 20 20 20 |nter_nee|ded. |
|00003570| 20 20 3d 20 63 68 65 63 | 6b 5f 66 72 61 6d 65 5f | = chec|k_frame_|
|00003580| 70 6f 69 6e 74 65 72 5f | 72 65 71 75 69 72 65 64 |pointer_|required|
|00003590| 20 28 72 65 67 5f 65 71 | 75 69 76 5f 63 6f 6e 73 | (reg_eq|uiv_cons|
|000035a0| 74 61 6e 74 2c 0d 09 09 | 09 09 20 20 20 20 20 20 |tant,...|.. |
|000035b0| 72 65 67 5f 65 71 75 69 | 76 5f 6d 65 6d 2c 20 72 |reg_equi|v_mem, r|
|000035c0| 65 67 5f 65 71 75 69 76 | 5f 61 64 64 72 65 73 73 |eg_equiv|_address|
|000035d0| 29 3b 0d 0d 20 20 2f 2a | 20 41 6c 74 65 72 20 65 |);.. /*| Alter e|
|000035e0| 61 63 68 20 70 73 65 75 | 64 6f 2d 72 65 67 20 72 |ach pseu|do-reg r|
|000035f0| 74 78 20 74 6f 20 63 6f | 6e 74 61 69 6e 20 69 74 |tx to co|ntain it|
|00003600| 73 20 68 61 72 64 20 72 | 65 67 20 6e 75 6d 62 65 |s hard r|eg numbe|
|00003610| 72 2e 0d 20 20 20 20 20 | 44 65 6c 65 74 65 20 69 |r.. |Delete i|
|00003620| 6e 69 74 69 61 6c 69 7a | 61 74 69 6f 6e 73 20 6f |nitializ|ations o|
|00003630| 66 20 70 73 65 75 64 6f | 73 20 74 68 61 74 20 64 |f pseudo|s that d|
|00003640| 6f 6e 27 74 20 68 61 76 | 65 20 68 61 72 64 20 72 |on't hav|e hard r|
|00003650| 65 67 73 0d 20 20 20 20 | 20 61 6e 64 20 64 6f 20 |egs. | and do |
|00003660| 68 61 76 65 20 65 71 75 | 69 76 61 6c 65 6e 74 73 |have equ|ivalents|
|00003670| 2e 0d 20 20 20 20 20 41 | 73 73 69 67 6e 20 73 74 |.. A|ssign st|
|00003680| 61 63 6b 20 73 6c 6f 74 | 73 20 74 6f 20 74 68 65 |ack slot|s to the|
|00003690| 20 70 73 65 75 64 6f 73 | 20 74 68 61 74 20 6c 61 | pseudos| that la|
|000036a0| 63 6b 20 68 61 72 64 20 | 72 65 67 73 20 6f 72 20 |ck hard |regs or |
|000036b0| 65 71 75 69 76 61 6c 65 | 6e 74 73 2e 20 20 2a 2f |equivale|nts. */|
|000036c0| 0d 0d 20 20 66 6f 72 20 | 28 69 20 3d 20 46 49 52 |.. for |(i = FIR|
|000036d0| 53 54 5f 50 53 45 55 44 | 4f 5f 52 45 47 49 53 54 |ST_PSEUD|O_REGIST|
|000036e0| 45 52 3b 20 69 20 3c 20 | 6d 61 78 5f 72 65 67 6e |ER; i < |max_regn|
|000036f0| 6f 3b 20 69 2b 2b 29 0d | 20 20 20 20 61 6c 74 65 |o; i++).| alte|
|00003700| 72 5f 72 65 67 20 28 69 | 2c 20 2d 31 29 3b 0d 0d |r_reg (i|, -1);..|
|00003710| 23 69 66 6e 64 65 66 20 | 52 45 47 49 53 54 45 52 |#ifndef |REGISTER|
|00003720| 5f 43 4f 4e 53 54 52 41 | 49 4e 54 53 0d 20 20 2f |_CONSTRA|INTS. /|
|00003730| 2a 20 49 66 20 61 6c 6c | 20 74 68 65 20 70 73 65 |* If all| the pse|
|00003740| 75 64 6f 20 72 65 67 73 | 20 68 61 76 65 20 68 61 |udo regs| have ha|
|00003750| 72 64 20 72 65 67 73 2c | 0d 20 20 20 20 20 65 78 |rd regs,|. ex|
|00003760| 63 65 70 74 20 66 6f 72 | 20 74 68 6f 73 65 20 74 |cept for| those t|
|00003770| 68 61 74 20 61 72 65 20 | 6e 65 76 65 72 20 72 65 |hat are |never re|
|00003780| 66 65 72 65 6e 63 65 64 | 2c 0d 20 20 20 20 20 77 |ferenced|,. w|
|00003790| 65 20 6b 6e 6f 77 20 74 | 68 61 74 20 6e 6f 20 72 |e know t|hat no r|
|000037a0| 65 6c 6f 61 64 73 20 61 | 72 65 20 6e 65 65 64 65 |eloads a|re neede|
|000037b0| 64 2e 20 20 2a 2f 0d 20 | 20 2f 2a 20 42 75 74 20 |d. */. | /* But |
|000037c0| 74 68 61 74 20 69 73 20 | 6e 6f 74 20 74 72 75 65 |that is |not true|
|000037d0| 20 69 66 20 74 68 65 72 | 65 20 61 72 65 20 72 65 | if ther|e are re|
|000037e0| 67 69 73 74 65 72 20 63 | 6f 6e 73 74 72 61 69 6e |gister c|onstrain|
|000037f0| 74 73 2c 20 73 69 6e 63 | 65 0d 20 20 20 20 20 69 |ts, sinc|e. i|
|00003800| 6e 20 74 68 61 74 20 63 | 61 73 65 20 73 6f 6d 65 |n that c|ase some|
|00003810| 20 70 73 65 75 64 6f 73 | 20 6d 69 67 68 74 20 62 | pseudos| might b|
|00003820| 65 20 69 6e 20 74 68 65 | 20 77 72 6f 6e 67 20 6b |e in the| wrong k|
|00003830| 69 6e 64 20 6f 66 20 68 | 61 72 64 20 72 65 67 2e |ind of h|ard reg.|
|00003840| 20 20 2a 2f 0d 0d 20 20 | 66 6f 72 20 28 69 20 3d | */.. |for (i =|
|00003850| 20 46 49 52 53 54 5f 50 | 53 45 55 44 4f 5f 52 45 | FIRST_P|SEUDO_RE|
|00003860| 47 49 53 54 45 52 3b 20 | 69 20 3c 20 6d 61 78 5f |GISTER; |i < max_|
|00003870| 72 65 67 6e 6f 3b 20 69 | 2b 2b 29 0d 20 20 20 20 |regno; i|++). |
|00003880| 69 66 20 28 72 65 67 5f | 72 65 6e 75 6d 62 65 72 |if (reg_|renumber|
|00003890| 5b 69 5d 20 3d 3d 20 2d | 31 20 26 26 20 72 65 67 |[i] == -|1 && reg|
|000038a0| 5f 6e 5f 72 65 66 73 5b | 69 5d 20 21 3d 20 30 29 |_n_refs[|i] != 0)|
|000038b0| 0d 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0d 0d 20 |. b|reak;.. |
|000038c0| 20 69 66 20 28 69 20 3d | 3d 20 6d 61 78 5f 72 65 | if (i =|= max_re|
|000038d0| 67 6e 6f 20 26 26 20 66 | 72 61 6d 65 5f 70 6f 69 |gno && f|rame_poi|
|000038e0| 6e 74 65 72 5f 6e 65 65 | 64 65 64 20 26 26 20 21 |nter_nee|ded && !|
|000038f0| 20 63 61 6c 6c 65 72 5f | 73 61 76 65 5f 6e 65 65 | caller_|save_nee|
|00003900| 64 65 64 29 0d 20 20 20 | 20 72 65 74 75 72 6e 3b |ded). | return;|
|00003910| 0d 23 65 6e 64 69 66 0d | 0d 20 20 2f 2a 20 43 6f |.#endif.|. /* Co|
|00003920| 6d 70 75 74 65 20 74 68 | 65 20 6f 72 64 65 72 20 |mpute th|e order |
|00003930| 6f 66 20 70 72 65 66 65 | 72 65 6e 63 65 20 66 6f |of prefe|rence fo|
|00003940| 72 20 68 61 72 64 20 72 | 65 67 69 73 74 65 72 73 |r hard r|egisters|
|00003950| 20 74 6f 20 73 70 69 6c | 6c 2e 0d 20 20 20 20 20 | to spil|l.. |
|00003960| 53 74 6f 72 65 20 74 68 | 65 6d 20 62 79 20 64 65 |Store th|em by de|
|00003970| 63 72 65 61 73 69 6e 67 | 20 70 72 65 66 65 72 65 |creasing| prefere|
|00003980| 6e 63 65 20 69 6e 20 70 | 6f 74 65 6e 74 69 61 6c |nce in p|otential|
|00003990| 5f 72 65 6c 6f 61 64 5f | 72 65 67 73 2e 20 20 2a |_reload_|regs. *|
|000039a0| 2f 0d 0d 20 20 6f 72 64 | 65 72 5f 72 65 67 73 5f |/.. ord|er_regs_|
|000039b0| 66 6f 72 5f 72 65 6c 6f | 61 64 20 28 29 3b 0d 0d |for_relo|ad ();..|
|000039c0| 20 20 2f 2a 20 53 6f 20 | 66 61 72 2c 20 6e 6f 20 | /* So |far, no |
|000039d0| 68 61 72 64 20 72 65 67 | 73 20 68 61 76 65 20 62 |hard reg|s have b|
|000039e0| 65 65 6e 20 73 70 69 6c | 6c 65 64 2e 20 20 2a 2f |een spil|led. */|
|000039f0| 0d 20 20 6e 5f 73 70 69 | 6c 6c 73 20 3d 20 30 3b |. n_spi|lls = 0;|
|00003a00| 0d 20 20 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |. for (|i = 0; i|
|00003a10| 20 3c 20 46 49 52 53 54 | 5f 50 53 45 55 44 4f 5f | < FIRST|_PSEUDO_|
|00003a20| 52 45 47 49 53 54 45 52 | 3b 20 69 2b 2b 29 0d 20 |REGISTER|; i++). |
|00003a30| 20 20 20 7b 0d 20 20 20 | 20 20 20 73 70 69 6c 6c | {. | spill|
|00003a40| 5f 72 65 67 5f 6f 72 64 | 65 72 5b 69 5d 20 3d 20 |_reg_ord|er[i] = |
|00003a50| 2d 31 3b 0d 20 20 20 20 | 20 20 66 6f 72 62 69 64 |-1;. | forbid|
|00003a60| 64 65 6e 5f 72 65 67 73 | 5b 69 5d 20 3d 20 2d 31 |den_regs|[i] = -1|
|00003a70| 3b 0d 20 20 20 20 7d 0d | 0d 20 20 69 66 20 28 63 |;. }.|. if (c|
|00003a80| 61 6c 6c 65 72 5f 73 61 | 76 65 5f 6e 65 65 64 65 |aller_sa|ve_neede|
|00003a90| 64 29 0d 20 20 20 20 66 | 72 61 6d 65 5f 70 6f 69 |d). f|rame_poi|
|00003aa0| 6e 74 65 72 5f 6e 65 65 | 64 65 64 20 3d 20 31 3b |nter_nee|ded = 1;|
|00003ab0| 0d 0d 20 20 69 66 20 28 | 66 72 61 6d 65 5f 70 6f |.. if (|frame_po|
|00003ac0| 69 6e 74 65 72 5f 6e 65 | 65 64 65 64 29 0d 20 20 |inter_ne|eded). |
|00003ad0| 20 20 7b 0d 20 20 20 20 | 20 20 66 6f 72 62 69 64 | {. | forbid|
|00003ae0| 64 65 6e 5f 72 65 67 73 | 5b 46 52 41 4d 45 5f 50 |den_regs|[FRAME_P|
|00003af0| 4f 49 4e 54 45 52 5f 52 | 45 47 4e 55 4d 5d 20 3d |OINTER_R|EGNUM] =|
|00003b00| 20 31 3b 0d 20 20 20 20 | 20 20 73 70 69 6c 6c 5f | 1;. | spill_|
|00003b10| 68 61 72 64 5f 72 65 67 | 20 28 46 52 41 4d 45 5f |hard_reg| (FRAME_|
|00003b20| 50 4f 49 4e 54 45 52 5f | 52 45 47 4e 55 4d 2c 20 |POINTER_|REGNUM, |
|00003b30| 67 6c 6f 62 61 6c 2c 20 | 64 75 6d 70 66 69 6c 65 |global, |dumpfile|
|00003b40| 29 3b 0d 20 20 20 20 7d | 0d 0d 20 20 69 66 20 28 |);. }|.. if (|
|00003b50| 67 6c 6f 62 61 6c 29 0d | 20 20 20 20 7b 0d 20 20 |global).| {. |
|00003b60| 20 20 20 20 62 61 73 69 | 63 5f 62 6c 6f 63 6b 5f | basi|c_block_|
|00003b70| 6e 65 65 64 73 20 3d 20 | 28 63 68 61 72 20 2a 29 |needs = |(char *)|
|00003b80| 61 6c 6c 6f 63 61 20 28 | 6e 5f 62 61 73 69 63 5f |alloca (|n_basic_|
|00003b90| 62 6c 6f 63 6b 73 29 3b | 0d 20 20 20 20 20 20 62 |blocks);|. b|
|00003ba0| 7a 65 72 6f 20 28 62 61 | 73 69 63 5f 62 6c 6f 63 |zero (ba|sic_bloc|
|00003bb0| 6b 5f 6e 65 65 64 73 2c | 20 6e 5f 62 61 73 69 63 |k_needs,| n_basic|
|00003bc0| 5f 62 6c 6f 63 6b 73 29 | 3b 0d 20 20 20 20 7d 0d |_blocks)|;. }.|
|00003bd0| 0d 20 20 2f 2a 20 54 68 | 69 73 20 6c 6f 6f 70 20 |. /* Th|is loop |
|00003be0| 73 63 61 6e 73 20 74 68 | 65 20 65 6e 74 69 72 65 |scans th|e entire|
|00003bf0| 20 66 75 6e 63 74 69 6f | 6e 20 65 61 63 68 20 67 | functio|n each g|
|00003c00| 6f 2d 72 6f 75 6e 64 0d | 20 20 20 20 20 61 6e 64 |o-round.| and|
|00003c10| 20 72 65 70 65 61 74 73 | 20 75 6e 74 69 6c 20 6f | repeats| until o|
|00003c20| 6e 65 20 72 65 70 65 74 | 69 74 69 6f 6e 20 73 70 |ne repet|ition sp|
|00003c30| 69 6c 6c 73 20 6e 6f 20 | 61 64 64 69 74 69 6f 6e |ills no |addition|
|00003c40| 61 6c 20 68 61 72 64 20 | 72 65 67 73 2e 20 20 2a |al hard |regs. *|
|00003c50| 2f 0d 0d 20 20 2f 2a 20 | 54 68 69 73 20 66 6c 61 |/.. /* |This fla|
|00003c60| 67 20 69 73 20 73 65 74 | 20 77 68 65 6e 20 61 20 |g is set| when a |
|00003c70| 70 73 75 65 64 6f 20 72 | 65 67 20 69 73 20 73 70 |psuedo r|eg is sp|
|00003c80| 69 6c 6c 65 64 2c 0d 20 | 20 20 20 20 74 6f 20 72 |illed,. | to r|
|00003c90| 65 71 75 69 72 65 20 61 | 6e 6f 74 68 65 72 20 70 |equire a|nother p|
|00003ca0| 61 73 73 2e 20 20 4e 6f | 74 65 20 74 68 61 74 20 |ass. No|te that |
|00003cb0| 67 65 74 74 69 6e 67 20 | 61 6e 20 61 64 64 69 74 |getting |an addit|
|00003cc0| 69 6f 6e 61 6c 20 72 65 | 6c 6f 61 64 0d 20 20 20 |ional re|load. |
|00003cd0| 20 20 72 65 67 20 64 6f | 65 73 20 6e 6f 74 20 6e | reg do|es not n|
|00003ce0| 65 63 65 73 73 61 72 69 | 6c 79 20 69 6d 70 6c 79 |ecessari|ly imply|
|00003cf0| 20 61 6e 79 20 70 73 65 | 75 64 6f 20 72 65 67 20 | any pse|udo reg |
|00003d00| 77 61 73 20 73 70 69 6c | 6c 65 64 3b 0d 20 20 20 |was spil|led;. |
|00003d10| 20 20 73 6f 6d 65 74 69 | 6d 65 73 20 77 65 20 66 | someti|mes we f|
|00003d20| 69 6e 64 20 61 20 72 65 | 6c 6f 61 64 20 72 65 67 |ind a re|load reg|
|00003d30| 20 74 68 61 74 20 6e 6f | 20 70 73 65 75 64 6f 20 | that no| pseudo |
|00003d40| 72 65 67 20 77 61 73 20 | 61 6c 6c 6f 63 61 74 65 |reg was |allocate|
|00003d50| 64 20 69 6e 2e 20 20 2a | 2f 0d 20 20 73 6f 6d 65 |d in. *|/. some|
|00003d60| 74 68 69 6e 67 5f 63 68 | 61 6e 67 65 64 20 3d 20 |thing_ch|anged = |
|00003d70| 31 3b 0d 20 20 2f 2a 20 | 54 68 69 73 20 66 6c 61 |1;. /* |This fla|
|00003d80| 67 20 69 73 20 73 65 74 | 20 69 66 20 74 68 65 72 |g is set| if ther|
|00003d90| 65 20 61 72 65 20 61 6e | 79 20 69 6e 73 6e 73 20 |e are an|y insns |
|00003da0| 74 68 61 74 20 72 65 71 | 75 69 72 65 20 72 65 6c |that req|uire rel|
|00003db0| 6f 61 64 69 6e 67 2e 20 | 20 2a 2f 0d 20 20 73 6f |oading. | */. so|
|00003dc0| 6d 65 74 68 69 6e 67 5f | 6e 65 65 64 73 5f 72 65 |mething_|needs_re|
|00003dd0| 6c 6f 61 64 73 20 3d 20 | 30 3b 0d 20 20 77 68 69 |loads = |0;. whi|
|00003de0| 6c 65 20 28 73 6f 6d 65 | 74 68 69 6e 67 5f 63 68 |le (some|thing_ch|
|00003df0| 61 6e 67 65 64 29 0d 20 | 20 20 20 7b 0d 20 20 20 |anged). | {. |
|00003e00| 20 20 20 2f 2a 20 46 6f | 72 20 65 61 63 68 20 63 | /* Fo|r each c|
|00003e10| 6c 61 73 73 2c 20 6e 75 | 6d 62 65 72 20 6f 66 20 |lass, nu|mber of |
|00003e20| 72 65 6c 6f 61 64 20 72 | 65 67 73 20 6e 65 65 64 |reload r|egs need|
|00003e30| 65 64 20 69 6e 20 74 68 | 61 74 20 63 6c 61 73 73 |ed in th|at class|
|00003e40| 2e 0d 09 20 54 68 69 73 | 20 69 73 20 74 68 65 20 |... This| is the |
|00003e50| 6d 61 78 69 6d 75 6d 20 | 6f 76 65 72 20 61 6c 6c |maximum |over all|
|00003e60| 20 69 6e 73 6e 73 20 6f | 66 20 74 68 65 20 6e 65 | insns o|f the ne|
|00003e70| 65 64 73 20 69 6e 20 74 | 68 61 74 20 63 6c 61 73 |eds in t|hat clas|
|00003e80| 73 0d 09 20 6f 66 20 74 | 68 65 20 69 6e 64 69 76 |s.. of t|he indiv|
|00003e90| 69 64 75 61 6c 20 69 6e | 73 6e 2e 20 20 2a 2f 0d |idual in|sn. */.|
|00003ea0| 20 20 20 20 20 20 69 6e | 74 20 6d 61 78 5f 6e 65 | in|t max_ne|
|00003eb0| 65 64 73 5b 4e 5f 52 45 | 47 5f 43 4c 41 53 53 45 |eds[N_RE|G_CLASSE|
|00003ec0| 53 5d 3b 0d 20 20 20 20 | 20 20 2f 2a 20 46 6f 72 |S];. | /* For|
|00003ed0| 20 65 61 63 68 20 63 6c | 61 73 73 2c 20 73 69 7a | each cl|ass, siz|
|00003ee0| 65 20 6f 66 20 67 72 6f | 75 70 20 6f 66 20 63 6f |e of gro|up of co|
|00003ef0| 6e 73 65 63 75 74 69 76 | 65 20 72 65 67 73 0d 09 |nsecutiv|e regs..|
|00003f00| 20 74 68 61 74 20 69 73 | 20 6e 65 65 64 65 64 20 | that is| needed |
|00003f10| 66 6f 72 20 74 68 65 20 | 72 65 6c 6f 61 64 73 20 |for the |reloads |
|00003f20| 6f 66 20 74 68 69 73 20 | 63 6c 61 73 73 2e 20 20 |of this |class. |
|00003f30| 2a 2f 0d 20 20 20 20 20 | 20 69 6e 74 20 67 72 6f |*/. | int gro|
|00003f40| 75 70 5f 73 69 7a 65 5b | 4e 5f 52 45 47 5f 43 4c |up_size[|N_REG_CL|
|00003f50| 41 53 53 45 53 5d 3b 0d | 20 20 20 20 20 20 2f 2a |ASSES];.| /*|
|00003f60| 20 46 6f 72 20 65 61 63 | 68 20 63 6c 61 73 73 2c | For eac|h class,|
|00003f70| 20 6d 61 78 20 6e 75 6d | 62 65 72 20 6f 66 20 63 | max num|ber of c|
|00003f80| 6f 6e 73 65 63 75 74 69 | 76 65 20 67 72 6f 75 70 |onsecuti|ve group|
|00003f90| 73 20 6e 65 65 64 65 64 | 2e 0d 09 20 28 45 61 63 |s needed|... (Eac|
|00003fa0| 68 20 67 72 6f 75 70 20 | 63 6f 6e 74 61 69 6e 73 |h group |contains|
|00003fb0| 20 6d 61 78 5f 6e 65 65 | 64 73 5f 73 69 7a 65 5b | max_nee|ds_size[|
|00003fc0| 43 4c 41 53 53 5d 20 63 | 6f 6e 73 65 63 75 74 69 |CLASS] c|onsecuti|
|00003fd0| 76 65 20 72 65 67 69 73 | 74 65 72 73 2e 29 20 20 |ve regis|ters.) |
|00003fe0| 2a 2f 0d 20 20 20 20 20 | 20 69 6e 74 20 6d 61 78 |*/. | int max|
|00003ff0| 5f 67 72 6f 75 70 73 5b | 4e 5f 52 45 47 5f 43 4c |_groups[|N_REG_CL|
|00004000| 41 53 53 45 53 5d 3b 0d | 20 20 20 20 20 20 2f 2a |ASSES];.| /*|
|00004010| 20 46 6f 72 20 65 61 63 | 68 20 63 6c 61 73 73 2c | For eac|h class,|
|00004020| 20 6d 61 78 20 6e 75 6d | 62 65 72 20 6e 65 65 64 | max num|ber need|
|00004030| 65 64 20 6f 66 20 72 65 | 67 73 20 74 68 61 74 20 |ed of re|gs that |
|00004040| 64 6f 6e 27 74 20 62 65 | 6c 6f 6e 67 0d 09 20 74 |don't be|long.. t|
|00004050| 6f 20 61 6e 79 20 6f 66 | 20 74 68 65 20 67 72 6f |o any of| the gro|
|00004060| 75 70 73 2e 20 20 2a 2f | 0d 20 20 20 20 20 20 69 |ups. */|. i|
|00004070| 6e 74 20 6d 61 78 5f 6e | 6f 6e 67 72 6f 75 70 73 |nt max_n|ongroups|
|00004080| 5b 4e 5f 52 45 47 5f 43 | 4c 41 53 53 45 53 5d 3b |[N_REG_C|LASSES];|
|00004090| 0d 20 20 20 20 20 20 2f | 2a 20 46 6f 72 20 65 61 |. /|* For ea|
|000040a0| 63 68 20 63 6c 61 73 73 | 2c 20 74 68 65 20 6d 61 |ch class|, the ma|
|000040b0| 63 68 69 6e 65 20 6d 6f | 64 65 20 77 68 69 63 68 |chine mo|de which|
|000040c0| 20 72 65 71 75 69 72 65 | 73 20 63 6f 6e 73 65 63 | require|s consec|
|000040d0| 75 74 69 76 65 0d 09 20 | 67 72 6f 75 70 73 20 6f |utive.. |groups o|
|000040e0| 66 20 72 65 67 73 20 6f | 66 20 74 68 61 74 20 63 |f regs o|f that c|
|000040f0| 6c 61 73 73 2e 0d 09 20 | 49 66 20 74 77 6f 20 64 |lass... |If two d|
|00004100| 69 66 66 65 72 65 6e 74 | 20 6d 6f 64 65 73 20 65 |ifferent| modes e|
|00004110| 76 65 72 20 72 65 71 75 | 69 72 65 20 67 72 6f 75 |ver requ|ire grou|
|00004120| 70 73 20 6f 66 20 6f 6e | 65 20 63 6c 61 73 73 2c |ps of on|e class,|
|00004130| 0d 09 20 74 68 65 79 20 | 6d 75 73 74 20 62 65 20 |.. they |must be |
|00004140| 74 68 65 20 73 61 6d 65 | 20 73 69 7a 65 20 61 6e |the same| size an|
|00004150| 64 20 65 71 75 61 6c 6c | 79 20 72 65 73 74 72 69 |d equall|y restri|
|00004160| 63 74 69 76 65 20 66 6f | 72 20 74 68 61 74 20 63 |ctive fo|r that c|
|00004170| 6c 61 73 73 2c 0d 09 20 | 6f 74 68 65 72 77 69 73 |lass,.. |otherwis|
|00004180| 65 20 77 65 20 63 61 6e | 27 74 20 68 61 6e 64 6c |e we can|'t handl|
|00004190| 65 20 74 68 65 20 63 6f | 6d 70 6c 65 78 69 74 79 |e the co|mplexity|
|000041a0| 2e 20 20 2a 2f 0d 20 20 | 20 20 20 20 65 6e 75 6d |. */. | enum|
|000041b0| 20 6d 61 63 68 69 6e 65 | 5f 6d 6f 64 65 20 67 72 | machine|_mode gr|
|000041c0| 6f 75 70 5f 6d 6f 64 65 | 5b 4e 5f 52 45 47 5f 43 |oup_mode|[N_REG_C|
|000041d0| 4c 41 53 53 45 53 5d 3b | 0d 0d 23 69 66 64 65 66 |LASSES];|..#ifdef|
|000041e0| 20 4d 50 57 0d 20 20 20 | 20 53 70 69 6e 43 75 72 | MPW. | SpinCur|
|000041f0| 73 6f 72 20 28 31 29 3b | 0d 23 65 6e 64 69 66 0d |sor (1);|.#endif.|
|00004200| 0d 20 20 20 20 20 20 73 | 6f 6d 65 74 68 69 6e 67 |. s|omething|
|00004210| 5f 63 68 61 6e 67 65 64 | 20 3d 20 30 3b 0d 20 20 |_changed| = 0;. |
|00004220| 20 20 20 20 62 7a 65 72 | 6f 20 28 6d 61 78 5f 6e | bzer|o (max_n|
|00004230| 65 65 64 73 2c 20 73 69 | 7a 65 6f 66 20 6d 61 78 |eeds, si|zeof max|
|00004240| 5f 6e 65 65 64 73 29 3b | 0d 20 20 20 20 20 20 62 |_needs);|. b|
|00004250| 7a 65 72 6f 20 28 6d 61 | 78 5f 67 72 6f 75 70 73 |zero (ma|x_groups|
|00004260| 2c 20 73 69 7a 65 6f 66 | 20 6d 61 78 5f 67 72 6f |, sizeof| max_gro|
|00004270| 75 70 73 29 3b 0d 20 20 | 20 20 20 20 62 7a 65 72 |ups);. | bzer|
|00004280| 6f 20 28 6d 61 78 5f 6e | 6f 6e 67 72 6f 75 70 73 |o (max_n|ongroups|
|00004290| 2c 20 73 69 7a 65 6f 66 | 20 6d 61 78 5f 6e 6f 6e |, sizeof| max_non|
|000042a0| 67 72 6f 75 70 73 29 3b | 0d 20 20 20 20 20 20 62 |groups);|. b|
|000042b0| 7a 65 72 6f 20 28 67 72 | 6f 75 70 5f 73 69 7a 65 |zero (gr|oup_size|
|000042c0| 2c 20 73 69 7a 65 6f 66 | 20 67 72 6f 75 70 5f 73 |, sizeof| group_s|
|000042d0| 69 7a 65 29 3b 0d 20 20 | 20 20 20 20 66 6f 72 20 |ize);. | for |
|000042e0| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 4e 5f 52 45 |(i = 0; |i < N_RE|
|000042f0| 47 5f 43 4c 41 53 53 45 | 53 3b 20 69 2b 2b 29 0d |G_CLASSE|S; i++).|
|00004300| 09 67 72 6f 75 70 5f 6d | 6f 64 65 5b 69 5d 20 3d |.group_m|ode[i] =|
|00004310| 20 56 4f 49 44 6d 6f 64 | 65 3b 0d 0d 20 20 20 20 | VOIDmod|e;.. |
|00004320| 20 20 2f 2a 20 4b 65 65 | 70 20 74 72 61 63 6b 20 | /* Kee|p track |
|00004330| 6f 66 20 77 68 69 63 68 | 20 62 61 73 69 63 20 62 |of which| basic b|
|00004340| 6c 6f 63 6b 73 20 61 72 | 65 20 6e 65 65 64 69 6e |locks ar|e needin|
|00004350| 67 20 74 68 65 20 72 65 | 6c 6f 61 64 73 2e 20 20 |g the re|loads. |
|00004360| 2a 2f 0d 20 20 20 20 20 | 20 74 68 69 73 5f 62 6c |*/. | this_bl|
|00004370| 6f 63 6b 20 3d 20 30 3b | 0d 0d 20 20 20 20 20 20 |ock = 0;|.. |
|00004380| 2f 2a 20 52 65 6d 65 6d | 62 65 72 20 77 68 65 74 |/* Remem|ber whet|
|00004390| 68 65 72 20 61 6e 79 20 | 65 6c 65 6d 65 6e 74 20 |her any |element |
|000043a0| 6f 66 20 62 61 73 69 63 | 5f 62 6c 6f 63 6b 5f 6e |of basic|_block_n|
|000043b0| 65 65 64 73 0d 09 20 63 | 68 61 6e 67 65 73 20 66 |eeds.. c|hanges f|
|000043c0| 72 6f 6d 20 30 20 74 6f | 20 31 20 69 6e 20 74 68 |rom 0 to| 1 in th|
|000043d0| 69 73 20 70 61 73 73 2e | 20 20 2a 2f 0d 20 20 20 |is pass.| */. |
|000043e0| 20 20 20 6e 65 77 5f 62 | 61 73 69 63 5f 62 6c 6f | new_b|asic_blo|
|000043f0| 63 6b 5f 6e 65 65 64 73 | 20 3d 20 30 3b 0d 0d 20 |ck_needs| = 0;.. |
|00004400| 20 20 20 20 20 2f 2a 20 | 43 6f 6d 70 75 74 65 20 | /* |Compute |
|00004410| 74 68 65 20 6d 6f 73 74 | 20 61 64 64 69 74 69 6f |the most| additio|
|00004420| 6e 61 6c 20 72 65 67 69 | 73 74 65 72 73 20 6e 65 |nal regi|sters ne|
|00004430| 65 64 65 64 20 62 79 20 | 61 6e 79 20 69 6e 73 74 |eded by |any inst|
|00004440| 72 75 63 74 69 6f 6e 2e | 0d 09 20 43 6f 6c 6c 65 |ruction.|.. Colle|
|00004450| 63 74 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 73 |ct infor|mation s|
|00004460| 65 70 61 72 61 74 65 6c | 79 20 66 6f 72 20 65 61 |eparatel|y for ea|
|00004470| 63 68 20 63 6c 61 73 73 | 20 6f 66 20 72 65 67 73 |ch class| of regs|
|00004480| 2e 20 20 2a 2f 0d 0d 20 | 20 20 20 20 20 66 6f 72 |. */.. | for|
|00004490| 20 28 69 6e 73 6e 20 3d | 20 66 69 72 73 74 3b 20 | (insn =| first; |
|000044a0| 69 6e 73 6e 3b 20 69 6e | 73 6e 20 3d 20 4e 45 58 |insn; in|sn = NEX|
|000044b0| 54 5f 49 4e 53 4e 20 28 | 69 6e 73 6e 29 29 0d 09 |T_INSN (|insn))..|
|000044c0| 7b 0d 09 20 20 69 66 20 | 28 67 6c 6f 62 61 6c 20 |{.. if |(global |
|000044d0| 26 26 20 74 68 69 73 5f | 62 6c 6f 63 6b 20 2b 20 |&& this_|block + |
|000044e0| 31 20 3c 20 6e 5f 62 61 | 73 69 63 5f 62 6c 6f 63 |1 < n_ba|sic_bloc|
|000044f0| 6b 73 0d 09 20 20 20 20 | 20 20 26 26 20 69 6e 73 |ks.. | && ins|
|00004500| 6e 20 3d 3d 20 62 61 73 | 69 63 5f 62 6c 6f 63 6b |n == bas|ic_block|
|00004510| 5f 68 65 61 64 5b 74 68 | 69 73 5f 62 6c 6f 63 6b |_head[th|is_block|
|00004520| 2b 31 5d 29 0d 09 20 20 | 20 20 2b 2b 74 68 69 73 |+1]).. | ++this|
|00004530| 5f 62 6c 6f 63 6b 3b 0d | 0d 09 20 20 69 66 20 28 |_block;.|.. if (|
|00004540| 47 45 54 5f 43 4f 44 45 | 20 28 69 6e 73 6e 29 20 |GET_CODE| (insn) |
|00004550| 3d 3d 20 49 4e 53 4e 20 | 7c 7c 20 47 45 54 5f 43 |== INSN ||| GET_C|
|00004560| 4f 44 45 20 28 69 6e 73 | 6e 29 20 3d 3d 20 4a 55 |ODE (ins|n) == JU|
|00004570| 4d 50 5f 49 4e 53 4e 0d | 09 20 20 20 20 20 20 7c |MP_INSN.|. ||
|00004580| 7c 20 47 45 54 5f 43 4f | 44 45 20 28 69 6e 73 6e || GET_CO|DE (insn|
|00004590| 29 20 3d 3d 20 43 41 4c | 4c 5f 49 4e 53 4e 29 0d |) == CAL|L_INSN).|
|000045a0| 09 20 20 20 20 7b 0d 09 | 20 20 20 20 20 20 2f 2a |. {..| /*|
|000045b0| 20 49 6e 69 74 69 61 6c | 6c 79 2c 20 63 6f 75 6e | Initial|ly, coun|
|000045c0| 74 20 52 45 4c 4f 41 44 | 5f 4f 54 48 45 52 20 72 |t RELOAD|_OTHER r|
|000045d0| 65 6c 6f 61 64 73 2e 0d | 09 09 20 4c 61 74 65 72 |eloads..|.. Later|
|000045e0| 2c 20 6d 65 72 67 65 20 | 69 6e 20 74 68 65 20 6f |, merge |in the o|
|000045f0| 74 68 65 72 20 6b 69 6e | 64 73 2e 20 20 2a 2f 0d |ther kin|ds. */.|
|00004600| 09 20 20 20 20 20 20 69 | 6e 74 20 69 6e 73 6e 5f |. i|nt insn_|
|00004610| 6e 65 65 64 73 5b 4e 5f | 52 45 47 5f 43 4c 41 53 |needs[N_|REG_CLAS|
|00004620| 53 45 53 5d 3b 0d 09 20 | 20 20 20 20 20 69 6e 74 |SES];.. | int|
|00004630| 20 69 6e 73 6e 5f 67 72 | 6f 75 70 73 5b 4e 5f 52 | insn_gr|oups[N_R|
|00004640| 45 47 5f 43 4c 41 53 53 | 45 53 5d 3b 0d 09 20 20 |EG_CLASS|ES];.. |
|00004650| 20 20 20 20 69 6e 74 20 | 69 6e 73 6e 5f 74 6f 74 | int |insn_tot|
|00004660| 61 6c 5f 67 72 6f 75 70 | 73 20 3d 20 30 3b 0d 0d |al_group|s = 0;..|
|00004670| 09 20 20 20 20 20 20 2f | 2a 20 43 6f 75 6e 74 20 |. /|* Count |
|00004680| 52 45 4c 4f 41 44 5f 46 | 4f 52 5f 49 4e 50 55 54 |RELOAD_F|OR_INPUT|
|00004690| 5f 52 45 4c 4f 41 44 5f | 41 44 44 52 45 53 53 20 |_RELOAD_|ADDRESS |
|000046a0| 72 65 6c 6f 61 64 73 2e | 20 20 2a 2f 0d 09 20 20 |reloads.| */.. |
|000046b0| 20 20 20 20 69 6e 74 20 | 69 6e 73 6e 5f 6e 65 65 | int |insn_nee|
|000046c0| 64 73 5f 66 6f 72 5f 69 | 6e 70 75 74 73 5b 4e 5f |ds_for_i|nputs[N_|
|000046d0| 52 45 47 5f 43 4c 41 53 | 53 45 53 5d 3b 0d 09 20 |REG_CLAS|SES];.. |
|000046e0| 20 20 20 20 20 69 6e 74 | 20 69 6e 73 6e 5f 67 72 | int| insn_gr|
|000046f0| 6f 75 70 73 5f 66 6f 72 | 5f 69 6e 70 75 74 73 5b |oups_for|_inputs[|
|00004700| 4e 5f 52 45 47 5f 43 4c | 41 53 53 45 53 5d 3b 0d |N_REG_CL|ASSES];.|
|00004710| 09 20 20 20 20 20 20 69 | 6e 74 20 69 6e 73 6e 5f |. i|nt insn_|
|00004720| 74 6f 74 61 6c 5f 67 72 | 6f 75 70 73 5f 66 6f 72 |total_gr|oups_for|
|00004730| 5f 69 6e 70 75 74 73 20 | 3d 20 30 3b 0d 0d 09 20 |_inputs |= 0;... |
|00004740| 20 20 20 20 20 2f 2a 20 | 43 6f 75 6e 74 20 52 45 | /* |Count RE|
|00004750| 4c 4f 41 44 5f 46 4f 52 | 5f 4f 55 54 50 55 54 5f |LOAD_FOR|_OUTPUT_|
|00004760| 52 45 4c 4f 41 44 5f 41 | 44 44 52 45 53 53 20 72 |RELOAD_A|DDRESS r|
|00004770| 65 6c 6f 61 64 73 2e 20 | 20 2a 2f 0d 09 20 20 20 |eloads. | */.. |
|00004780| 20 20 20 69 6e 74 20 69 | 6e 73 6e 5f 6e 65 65 64 | int i|nsn_need|
|00004790| 73 5f 66 6f 72 5f 6f 75 | 74 70 75 74 73 5b 4e 5f |s_for_ou|tputs[N_|
|000047a0| 52 45 47 5f 43 4c 41 53 | 53 45 53 5d 3b 0d 09 20 |REG_CLAS|SES];.. |
|000047b0| 20 20 20 20 20 69 6e 74 | 20 69 6e 73 6e 5f 67 72 | int| insn_gr|
|000047c0| 6f 75 70 73 5f 66 6f 72 | 5f 6f 75 74 70 75 74 73 |oups_for|_outputs|
|000047d0| 5b 4e 5f 52 45 47 5f 43 | 4c 41 53 53 45 53 5d 3b |[N_REG_C|LASSES];|
|000047e0| 0d 09 20 20 20 20 20 20 | 69 6e 74 20 69 6e 73 6e |.. |int insn|
|000047f0| 5f 74 6f 74 61 6c 5f 67 | 72 6f 75 70 73 5f 66 6f |_total_g|roups_fo|
|00004800| 72 5f 6f 75 74 70 75 74 | 73 20 3d 20 30 3b 0d 0d |r_output|s = 0;..|
|00004810| 09 20 20 20 20 20 20 2f | 2a 20 43 6f 75 6e 74 20 |. /|* Count |
|00004820| 52 45 4c 4f 41 44 5f 46 | 4f 52 5f 4f 50 45 52 41 |RELOAD_F|OR_OPERA|
|00004830| 4e 44 5f 41 44 44 52 45 | 53 53 20 72 65 6c 6f 61 |ND_ADDRE|SS reloa|
|00004840| 64 73 2e 20 20 2a 2f 0d | 09 20 20 20 20 20 20 69 |ds. */.|. i|
|00004850| 6e 74 20 69 6e 73 6e 5f | 6e 65 65 64 73 5f 66 6f |nt insn_|needs_fo|
|00004860| 72 5f 6f 70 65 72 61 6e | 64 73 5b 4e 5f 52 45 47 |r_operan|ds[N_REG|
|00004870| 5f 43 4c 41 53 53 45 53 | 5d 3b 0d 09 20 20 20 20 |_CLASSES|];.. |
|00004880| 20 20 69 6e 74 20 69 6e | 73 6e 5f 67 72 6f 75 70 | int in|sn_group|
|00004890| 73 5f 66 6f 72 5f 6f 70 | 65 72 61 6e 64 73 5b 4e |s_for_op|erands[N|
|000048a0| 5f 52 45 47 5f 43 4c 41 | 53 53 45 53 5d 3b 0d 09 |_REG_CLA|SSES];..|
|000048b0| 20 20 20 20 20 20 69 6e | 74 20 69 6e 73 6e 5f 74 | in|t insn_t|
|000048c0| 6f 74 61 6c 5f 67 72 6f | 75 70 73 5f 66 6f 72 5f |otal_gro|ups_for_|
|000048d0| 6f 70 65 72 61 6e 64 73 | 20 3d 20 30 3b 0d 0d 09 |operands| = 0;...|
|000048e0| 20 20 20 20 20 20 66 6f | 72 20 28 69 20 3d 20 30 | fo|r (i = 0|
|000048f0| 3b 20 69 20 3c 20 4e 5f | 52 45 47 5f 43 4c 41 53 |; i < N_|REG_CLAS|
|00004900| 53 45 53 3b 20 69 2b 2b | 29 0d 09 09 7b 0d 09 09 |SES; i++|)...{...|
|00004910| 20 20 69 6e 73 6e 5f 6e | 65 65 64 73 5b 69 5d 20 | insn_n|eeds[i] |
|00004920| 3d 20 30 2c 20 69 6e 73 | 6e 5f 67 72 6f 75 70 73 |= 0, ins|n_groups|
|00004930| 5b 69 5d 20 3d 20 30 3b | 0d 09 09 20 20 69 6e 73 |[i] = 0;|... ins|
|00004940| 6e 5f 6e 65 65 64 73 5f | 66 6f 72 5f 69 6e 70 75 |n_needs_|for_inpu|
|00004950| 74 73 5b 69 5d 20 3d 20 | 30 2c 20 69 6e 73 6e 5f |ts[i] = |0, insn_|
|00004960| 67 72 6f 75 70 73 5f 66 | 6f 72 5f 69 6e 70 75 74 |groups_f|or_input|
|00004970| 73 5b 69 5d 20 3d 20 30 | 3b 0d 09 09 20 20 69 6e |s[i] = 0|;... in|
|00004980| 73 6e 5f 6e 65 65 64 73 | 5f 66 6f 72 5f 6f 75 74 |sn_needs|_for_out|
|00004990| 70 75 74 73 5b 69 5d 20 | 3d 20 30 2c 20 69 6e 73 |puts[i] |= 0, ins|
|000049a0| 6e 5f 67 72 6f 75 70 73 | 5f 66 6f 72 5f 6f 75 74 |n_groups|_for_out|
|000049b0| 70 75 74 73 5b 69 5d 20 | 3d 20 30 3b 0d 09 09 20 |puts[i] |= 0;... |
|000049c0| 20 69 6e 73 6e 5f 6e 65 | 65 64 73 5f 66 6f 72 5f | insn_ne|eds_for_|
|000049d0| 6f 70 65 72 61 6e 64 73 | 5b 69 5d 20 3d 20 30 2c |operands|[i] = 0,|
|000049e0| 20 69 6e 73 6e 5f 67 72 | 6f 75 70 73 5f 66 6f 72 | insn_gr|oups_for|
|000049f0| 5f 6f 70 65 72 61 6e 64 | 73 5b 69 5d 20 3d 20 30 |_operand|s[i] = 0|
|00004a00| 3b 0d 09 09 7d 0d 0d 23 | 69 66 20 30 20 20 2f 2a |;...}..#|if 0 /*|
|00004a10| 20 54 68 69 73 20 77 6f | 75 6c 64 6e 27 74 20 77 | This wo|uldn't w|
|00004a20| 6f 72 6b 20 6e 6f 77 61 | 64 61 79 73 2c 20 73 69 |ork nowa|days, si|
|00004a30| 6e 63 65 20 6f 70 74 69 | 6d 69 7a 65 5f 62 69 74 |nce opti|mize_bit|
|00004a40| 5f 66 69 65 6c 64 0d 09 | 20 20 6c 6f 6f 6b 73 20 |_field..| looks |
|00004a50| 66 6f 72 20 6e 6f 6e 2d | 73 74 72 69 63 74 20 6d |for non-|strict m|
|00004a60| 65 6d 6f 72 79 20 61 64 | 64 72 65 73 73 65 73 2e |emory ad|dresses.|
|00004a70| 20 20 2a 2f 0d 09 20 20 | 20 20 20 20 2f 2a 20 4f | */.. | /* O|
|00004a80| 70 74 69 6d 69 7a 61 74 | 69 6f 6e 3a 20 61 20 62 |ptimizat|ion: a b|
|00004a90| 69 74 2d 66 69 65 6c 64 | 20 69 6e 73 74 72 75 63 |it-field| instruc|
|00004aa0| 74 69 6f 6e 20 77 68 6f | 73 65 20 66 69 65 6c 64 |tion who|se field|
|00004ab0| 0d 09 09 20 68 61 70 70 | 65 6e 73 20 74 6f 20 62 |... happ|ens to b|
|00004ac0| 65 20 61 20 62 79 74 65 | 20 6f 72 20 68 61 6c 66 |e a byte| or half|
|00004ad0| 77 6f 72 64 20 69 6e 20 | 6d 65 6d 6f 72 79 0d 09 |word in |memory..|
|00004ae0| 09 20 63 61 6e 20 62 65 | 20 63 68 61 6e 67 65 64 |. can be| changed|
|00004af0| 20 74 6f 20 61 20 6d 6f | 76 65 20 69 6e 73 74 72 | to a mo|ve instr|
|00004b00| 75 63 74 69 6f 6e 2e 20 | 20 2a 2f 0d 0d 09 20 20 |uction. | */... |
|00004b10| 20 20 20 20 69 66 20 28 | 47 45 54 5f 43 4f 44 45 | if (|GET_CODE|
|00004b20| 20 28 50 41 54 54 45 52 | 4e 20 28 69 6e 73 6e 29 | (PATTER|N (insn)|
|00004b30| 29 20 3d 3d 20 53 45 54 | 29 0d 09 09 7b 0d 09 09 |) == SET|)...{...|
|00004b40| 20 20 72 74 78 20 64 65 | 73 74 20 3d 20 53 45 54 | rtx de|st = SET|
|00004b50| 5f 44 45 53 54 20 28 50 | 41 54 54 45 52 4e 20 28 |_DEST (P|ATTERN (|
|00004b60| 69 6e 73 6e 29 29 3b 0d | 09 09 20 20 72 74 78 20 |insn));.|.. rtx |
|00004b70| 73 72 63 20 3d 20 53 45 | 54 5f 53 52 43 20 28 50 |src = SE|T_SRC (P|
|00004b80| 41 54 54 45 52 4e 20 28 | 69 6e 73 6e 29 29 3b 0d |ATTERN (|insn));.|
|00004b90| 0d 09 09 20 20 69 66 20 | 28 47 45 54 5f 43 4f 44 |... if |(GET_COD|
|00004ba0| 45 20 28 64 65 73 74 29 | 20 3d 3d 20 5a 45 52 4f |E (dest)| == ZERO|
|00004bb0| 5f 45 58 54 52 41 43 54 | 0d 09 09 20 20 20 20 20 |_EXTRACT|... |
|00004bc0| 20 7c 7c 20 47 45 54 5f | 43 4f 44 45 20 28 64 65 | || GET_|CODE (de|
|00004bd0| 73 74 29 20 3d 3d 20 53 | 49 47 4e 5f 45 58 54 52 |st) == S|IGN_EXTR|
|00004be0| 41 43 54 29 0d 09 09 20 | 20 20 20 6f 70 74 69 6d |ACT)... | optim|
|00004bf0| 69 7a 65 5f 62 69 74 5f | 66 69 65 6c 64 20 28 50 |ize_bit_|field (P|
|00004c00| 41 54 54 45 52 4e 20 28 | 69 6e 73 6e 29 2c 20 69 |ATTERN (|insn), i|
|00004c10| 6e 73 6e 2c 20 72 65 67 | 5f 65 71 75 69 76 5f 6d |nsn, reg|_equiv_m|
|00004c20| 65 6d 29 3b 0d 09 09 20 | 20 69 66 20 28 47 45 54 |em);... | if (GET|
|00004c30| 5f 43 4f 44 45 20 28 73 | 72 63 29 20 3d 3d 20 5a |_CODE (s|rc) == Z|
|00004c40| 45 52 4f 5f 45 58 54 52 | 41 43 54 0d 09 09 20 20 |ERO_EXTR|ACT... |
|00004c50| 20 20 20 20 7c 7c 20 47 | 45 54 5f 43 4f 44 45 20 | || G|ET_CODE |
|00004c60| 28 73 72 63 29 20 3d 3d | 20 53 49 47 4e 5f 45 58 |(src) ==| SIGN_EX|
|00004c70| 54 52 41 43 54 29 0d 09 | 09 20 20 20 20 6f 70 74 |TRACT)..|. opt|
|00004c80| 69 6d 69 7a 65 5f 62 69 | 74 5f 66 69 65 6c 64 20 |imize_bi|t_field |
|00004c90| 28 50 41 54 54 45 52 4e | 20 28 69 6e 73 6e 29 2c |(PATTERN| (insn),|
|00004ca0| 20 69 6e 73 6e 2c 20 72 | 65 67 5f 65 71 75 69 76 | insn, r|eg_equiv|
|00004cb0| 5f 6d 65 6d 29 3b 0d 09 | 09 7d 0d 23 65 6e 64 69 |_mem);..|.}.#endi|
|00004cc0| 66 0d 0d 09 20 20 20 20 | 20 20 2f 2a 20 41 6e 61 |f... | /* Ana|
|00004cd0| 6c 79 7a 65 20 74 68 65 | 20 69 6e 73 74 72 75 63 |lyze the| instruc|
|00004ce0| 74 69 6f 6e 2e 20 20 2a | 2f 0d 0d 09 20 20 20 20 |tion. *|/... |
|00004cf0| 20 20 66 69 6e 64 5f 72 | 65 6c 6f 61 64 73 20 28 | find_r|eloads (|
|00004d00| 69 6e 73 6e 2c 20 30 2c | 20 73 70 69 6c 6c 5f 69 |insn, 0,| spill_i|
|00004d10| 6e 64 69 72 65 63 74 5f | 6f 6b 2c 20 67 6c 6f 62 |ndirect_|ok, glob|
|00004d20| 61 6c 2c 20 73 70 69 6c | 6c 5f 72 65 67 5f 6f 72 |al, spil|l_reg_or|
|00004d30| 64 65 72 29 3b 0d 0d 09 | 20 20 20 20 20 20 69 66 |der);...| if|
|00004d40| 20 28 6e 5f 72 65 6c 6f | 61 64 73 20 3d 3d 20 30 | (n_relo|ads == 0|
|00004d50| 29 0d 09 09 63 6f 6e 74 | 69 6e 75 65 3b 0d 0d 09 |)...cont|inue;...|
|00004d60| 20 20 20 20 20 20 73 6f | 6d 65 74 68 69 6e 67 5f | so|mething_|
|00004d70| 6e 65 65 64 73 5f 72 65 | 6c 6f 61 64 73 20 3d 20 |needs_re|loads = |
|00004d80| 31 3b 0d 0d 09 20 20 20 | 20 20 20 2f 2a 20 43 6f |1;... | /* Co|
|00004d90| 75 6e 74 20 65 61 63 68 | 20 72 65 6c 6f 61 64 20 |unt each| reload |
|00004da0| 6f 6e 63 65 20 69 6e 20 | 65 76 65 72 79 20 63 6c |once in |every cl|
|00004db0| 61 73 73 0d 09 09 20 63 | 6f 6e 74 61 69 6e 69 6e |ass... c|ontainin|
|00004dc0| 67 20 74 68 65 20 72 65 | 6c 6f 61 64 27 73 20 6f |g the re|load's o|
|00004dd0| 77 6e 20 63 6c 61 73 73 | 2e 20 20 2a 2f 0d 0d 09 |wn class|. */...|
|00004de0| 20 20 20 20 20 20 66 6f | 72 20 28 69 20 3d 20 30 | fo|r (i = 0|
|00004df0| 3b 20 69 20 3c 20 6e 5f | 72 65 6c 6f 61 64 73 3b |; i < n_|reloads;|
|00004e00| 20 69 2b 2b 29 0d 09 09 | 7b 0d 09 09 20 20 72 65 | i++)...|{... re|
|00004e10| 67 69 73 74 65 72 20 65 | 6e 75 6d 20 72 65 67 5f |gister e|num reg_|
|00004e20| 63 6c 61 73 73 20 2a 70 | 3b 0d 09 09 20 20 69 6e |class *p|;... in|
|00004e30| 74 20 73 69 7a 65 3b 0d | 09 09 20 20 65 6e 75 6d |t size;.|.. enum|
|00004e40| 20 6d 61 63 68 69 6e 65 | 5f 6d 6f 64 65 20 6d 6f | machine|_mode mo|
|00004e50| 64 65 3b 0d 09 09 20 20 | 69 6e 74 20 2a 74 68 69 |de;... |int *thi|
|00004e60| 73 5f 67 72 6f 75 70 73 | 3b 0d 09 09 20 20 69 6e |s_groups|;... in|
|00004e70| 74 20 2a 74 68 69 73 5f | 6e 65 65 64 73 3b 0d 09 |t *this_|needs;..|
|00004e80| 09 20 20 69 6e 74 20 2a | 74 68 69 73 5f 74 6f 74 |. int *|this_tot|
|00004e90| 61 6c 5f 67 72 6f 75 70 | 73 3b 0d 0d 09 09 20 20 |al_group|s;.... |
|00004ea0| 2f 2a 20 44 6f 6e 27 74 | 20 75 73 65 20 64 75 6d |/* Don't| use dum|
|00004eb0| 6d 79 20 72 65 6c 6f 61 | 64 73 20 69 6e 20 72 65 |my reloa|ds in re|
|00004ec0| 67 73 0d 09 09 20 20 20 | 20 20 62 65 69 6e 67 20 |gs... | being |
|00004ed0| 73 70 69 6c 6c 65 64 20 | 69 6e 20 74 68 69 73 20 |spilled |in this |
|00004ee0| 62 6c 6f 63 6b 2e 20 20 | 2a 2f 0d 09 09 20 20 69 |block. |*/... i|
|00004ef0| 66 20 28 72 65 6c 6f 61 | 64 5f 72 65 67 5f 72 74 |f (reloa|d_reg_rt|
|00004f00| 78 5b 69 5d 20 21 3d 20 | 30 0d 09 09 20 20 20 20 |x[i] != |0... |
|00004f10| 20 20 26 26 20 28 21 67 | 6c 6f 62 61 6c 20 7c 7c | && (!g|lobal |||
|00004f20| 20 62 61 73 69 63 5f 62 | 6c 6f 63 6b 5f 6e 65 65 | basic_b|lock_nee|
|00004f30| 64 73 5b 74 68 69 73 5f | 62 6c 6f 63 6b 5d 29 0d |ds[this_|block]).|
|00004f40| 09 09 20 20 20 20 20 20 | 26 26 20 73 70 69 6c 6c |.. |&& spill|
|00004f50| 5f 72 65 67 5f 6f 72 64 | 65 72 5b 52 45 47 4e 4f |_reg_ord|er[REGNO|
|00004f60| 20 28 72 65 6c 6f 61 64 | 5f 72 65 67 5f 72 74 78 | (reload|_reg_rtx|
|00004f70| 5b 69 5d 29 5d 20 3e 3d | 20 30 29 0d 09 09 20 20 |[i])] >=| 0)... |
|00004f80| 20 20 72 65 6c 6f 61 64 | 5f 72 65 67 5f 72 74 78 | reload|_reg_rtx|
|00004f90| 5b 69 5d 20 3d 20 30 3b | 0d 0d 09 09 20 20 2f 2a |[i] = 0;|.... /*|
|00004fa0| 20 44 6f 6e 27 74 20 63 | 6f 75 6e 74 20 74 68 65 | Don't c|ount the|
|00004fb0| 20 64 75 6d 6d 79 20 72 | 65 6c 6f 61 64 73 2c 20 | dummy r|eloads, |
|00004fc0| 66 6f 72 20 77 68 69 63 | 68 20 6f 6e 65 20 6f 66 |for whic|h one of|
|00004fd0| 20 74 68 65 0d 09 09 20 | 20 20 20 20 72 65 67 73 | the... | regs|
|00004fe0| 20 6d 65 6e 74 69 6f 6e | 65 64 20 69 6e 20 74 68 | mention|ed in th|
|00004ff0| 65 20 69 6e 73 6e 20 63 | 61 6e 20 62 65 20 75 73 |e insn c|an be us|
|00005000| 65 64 20 66 6f 72 20 72 | 65 6c 6f 61 64 69 6e 67 |ed for r|eloading|
|00005010| 2e 0d 09 09 20 20 20 20 | 20 44 6f 6e 27 74 20 63 |.... | Don't c|
|00005020| 6f 75 6e 74 20 6f 70 74 | 69 6f 6e 61 6c 20 72 65 |ount opt|ional re|
|00005030| 6c 6f 61 64 73 2e 0d 09 | 09 20 20 20 20 20 44 6f |loads...|. Do|
|00005040| 6e 27 74 20 63 6f 75 6e | 74 20 72 65 6c 6f 61 64 |n't coun|t reload|
|00005050| 73 20 74 68 61 74 20 67 | 6f 74 20 63 6f 6d 62 69 |s that g|ot combi|
|00005060| 6e 65 64 20 77 69 74 68 | 20 6f 74 68 65 72 73 2e |ned with| others.|
|00005070| 20 20 2a 2f 0d 09 09 20 | 20 69 66 20 28 72 65 6c | */... | if (rel|
|00005080| 6f 61 64 5f 72 65 67 5f | 72 74 78 5b 69 5d 20 21 |oad_reg_|rtx[i] !|
|00005090| 3d 20 30 0d 09 09 20 20 | 20 20 20 20 7c 7c 20 72 |= 0... | || r|
|000050a0| 65 6c 6f 61 64 5f 6f 70 | 74 69 6f 6e 61 6c 5b 69 |eload_op|tional[i|
|000050b0| 5d 20 21 3d 20 30 0d 09 | 09 20 20 20 20 20 20 7c |] != 0..|. ||
|000050c0| 7c 20 28 72 65 6c 6f 61 | 64 5f 6f 75 74 5b 69 5d || (reloa|d_out[i]|
|000050d0| 20 3d 3d 20 30 20 26 26 | 20 72 65 6c 6f 61 64 5f | == 0 &&| reload_|
|000050e0| 69 6e 5b 69 5d 20 3d 3d | 20 30 29 29 0d 09 09 20 |in[i] ==| 0))... |
|000050f0| 20 20 20 63 6f 6e 74 69 | 6e 75 65 3b 0d 0d 09 09 | conti|nue;....|
|00005100| 20 20 2f 2a 20 44 65 63 | 69 64 65 20 77 68 69 63 | /* Dec|ide whic|
|00005110| 68 20 74 69 6d 65 2d 6f | 66 2d 75 73 65 20 74 6f |h time-o|f-use to|
|00005120| 20 63 6f 75 6e 74 20 74 | 68 69 73 20 72 65 6c 6f | count t|his relo|
|00005130| 61 64 20 66 6f 72 2e 20 | 20 2a 2f 0d 09 09 20 20 |ad for. | */... |
|00005140| 73 77 69 74 63 68 20 28 | 72 65 6c 6f 61 64 5f 77 |switch (|reload_w|
|00005150| 68 65 6e 5f 6e 65 65 64 | 65 64 5b 69 5d 29 0d 09 |hen_need|ed[i])..|
|00005160| 09 20 20 20 20 7b 0d 09 | 09 20 20 20 20 63 61 73 |. {..|. cas|
|00005170| 65 20 52 45 4c 4f 41 44 | 5f 4f 54 48 45 52 3a 0d |e RELOAD|_OTHER:.|
|00005180| 09 09 20 20 20 20 20 20 | 74 68 69 73 5f 6e 65 65 |.. |this_nee|
|00005190| 64 73 20 3d 20 69 6e 73 | 6e 5f 6e 65 65 64 73 3b |ds = ins|n_needs;|
|000051a0| 0d 09 09 20 20 20 20 20 | 20 74 68 69 73 5f 67 72 |... | this_gr|
|000051b0| 6f 75 70 73 20 3d 20 69 | 6e 73 6e 5f 67 72 6f 75 |oups = i|nsn_grou|
|000051c0| 70 73 3b 0d 09 09 20 20 | 20 20 20 20 74 68 69 73 |ps;... | this|
|000051d0| 5f 74 6f 74 61 6c 5f 67 | 72 6f 75 70 73 20 3d 20 |_total_g|roups = |
|000051e0| 26 69 6e 73 6e 5f 74 6f | 74 61 6c 5f 67 72 6f 75 |&insn_to|tal_grou|
|000051f0| 70 73 3b 0d 09 09 20 20 | 20 20 20 20 62 72 65 61 |ps;... | brea|
|00005200| 6b 3b 0d 0d 09 09 20 20 | 20 20 63 61 73 65 20 52 |k;.... | case R|
|00005210| 45 4c 4f 41 44 5f 46 4f | 52 5f 49 4e 50 55 54 5f |ELOAD_FO|R_INPUT_|
|00005220| 52 45 4c 4f 41 44 5f 41 | 44 44 52 45 53 53 3a 0d |RELOAD_A|DDRESS:.|
|00005230| 09 09 20 20 20 20 20 20 | 74 68 69 73 5f 6e 65 65 |.. |this_nee|
|00005240| 64 73 20 3d 20 69 6e 73 | 6e 5f 6e 65 65 64 73 5f |ds = ins|n_needs_|
|00005250| 66 6f 72 5f 69 6e 70 75 | 74 73 3b 0d 09 09 20 20 |for_inpu|ts;... |
|00005260| 20 20 20 20 74 68 69 73 | 5f 67 72 6f 75 70 73 20 | this|_groups |
|00005270| 3d 20 69 6e 73 6e 5f 67 | 72 6f 75 70 73 5f 66 6f |= insn_g|roups_fo|
|00005280| 72 5f 69 6e 70 75 74 73 | 3b 0d 09 09 20 20 20 20 |r_inputs|;... |
|00005290| 20 20 74 68 69 73 5f 74 | 6f 74 61 6c 5f 67 72 6f | this_t|otal_gro|
|000052a0| 75 70 73 20 3d 20 26 69 | 6e 73 6e 5f 74 6f 74 61 |ups = &i|nsn_tota|
|000052b0| 6c 5f 67 72 6f 75 70 73 | 5f 66 6f 72 5f 69 6e 70 |l_groups|_for_inp|
|000052c0| 75 74 73 3b 0d 09 09 20 | 20 20 20 20 20 62 72 65 |uts;... | bre|
|000052d0| 61 6b 3b 0d 0d 09 09 20 | 20 20 20 63 61 73 65 20 |ak;.... | case |
|000052e0| 52 45 4c 4f 41 44 5f 46 | 4f 52 5f 4f 55 54 50 55 |RELOAD_F|OR_OUTPU|
|000052f0| 54 5f 52 45 4c 4f 41 44 | 5f 41 44 44 52 45 53 53 |T_RELOAD|_ADDRESS|
|00005300| 3a 0d 09 09 20 20 20 20 | 20 20 74 68 69 73 5f 6e |:... | this_n|
|00005310| 65 65 64 73 20 3d 20 69 | 6e 73 6e 5f 6e 65 65 64 |eeds = i|nsn_need|
|00005320| 73 5f 66 6f 72 5f 6f 75 | 74 70 75 74 73 3b 0d 09 |s_for_ou|tputs;..|
|00005330| 09 20 20 20 20 20 20 74 | 68 69 73 5f 67 72 6f 75 |. t|his_grou|
|00005340| 70 73 20 3d 20 69 6e 73 | 6e 5f 67 72 6f 75 70 73 |ps = ins|n_groups|
|00005350| 5f 66 6f 72 5f 6f 75 74 | 70 75 74 73 3b 0d 09 09 |_for_out|puts;...|
|00005360| 20 20 20 20 20 20 74 68 | 69 73 5f 74 6f 74 61 6c | th|is_total|
|00005370| 5f 67 72 6f 75 70 73 20 | 3d 20 26 69 6e 73 6e 5f |_groups |= &insn_|
|00005380| 74 6f 74 61 6c 5f 67 72 | 6f 75 70 73 5f 66 6f 72 |total_gr|oups_for|
|00005390| 5f 6f 75 74 70 75 74 73 | 3b 0d 09 09 20 20 20 20 |_outputs|;... |
|000053a0| 20 20 62 72 65 61 6b 3b | 0d 0d 09 09 20 20 20 20 | break;|.... |
|000053b0| 63 61 73 65 20 52 45 4c | 4f 41 44 5f 46 4f 52 5f |case REL|OAD_FOR_|
|000053c0| 4f 50 45 52 41 4e 44 5f | 41 44 44 52 45 53 53 3a |OPERAND_|ADDRESS:|
|000053d0| 0d 09 09 20 20 20 20 20 | 20 74 68 69 73 5f 6e 65 |... | this_ne|
|000053e0| 65 64 73 20 3d 20 69 6e | 73 6e 5f 6e 65 65 64 73 |eds = in|sn_needs|
|000053f0| 5f 66 6f 72 5f 6f 70 65 | 72 61 6e 64 73 3b 0d 09 |_for_ope|rands;..|
|00005400| 09 20 20 20 20 20 20 74 | 68 69 73 5f 67 72 6f 75 |. t|his_grou|
|00005410| 70 73 20 3d 20 69 6e 73 | 6e 5f 67 72 6f 75 70 73 |ps = ins|n_groups|
|00005420| 5f 66 6f 72 5f 6f 70 65 | 72 61 6e 64 73 3b 0d 09 |_for_ope|rands;..|
|00005430| 09 20 20 20 20 20 20 74 | 68 69 73 5f 74 6f 74 61 |. t|his_tota|
|00005440| 6c 5f 67 72 6f 75 70 73 | 20 3d 20 26 69 6e 73 6e |l_groups| = &insn|
|00005450| 5f 74 6f 74 61 6c 5f 67 | 72 6f 75 70 73 5f 66 6f |_total_g|roups_fo|
|00005460| 72 5f 6f 70 65 72 61 6e | 64 73 3b 0d 09 09 20 20 |r_operan|ds;... |
|00005470| 20 20 20 20 62 72 65 61 | 6b 3b 0d 09 09 20 20 20 | brea|k;... |
|00005480| 20 7d 0d 0d 09 09 20 20 | 6d 6f 64 65 20 3d 20 72 | }.... |mode = r|
|00005490| 65 6c 6f 61 64 5f 69 6e | 6d 6f 64 65 5b 69 5d 3b |eload_in|mode[i];|
|000054a0| 0d 09 09 20 20 69 66 20 | 28 47 45 54 5f 4d 4f 44 |... if |(GET_MOD|
|000054b0| 45 5f 53 49 5a 45 20 28 | 72 65 6c 6f 61 64 5f 6f |E_SIZE (|reload_o|
|000054c0| 75 74 6d 6f 64 65 5b 69 | 5d 29 20 3e 20 47 45 54 |utmode[i|]) > GET|
|000054d0| 5f 4d 4f 44 45 5f 53 49 | 5a 45 20 28 6d 6f 64 65 |_MODE_SI|ZE (mode|
|000054e0| 29 29 0d 09 09 20 20 20 | 20 6d 6f 64 65 20 3d 20 |))... | mode = |
|000054f0| 72 65 6c 6f 61 64 5f 6f | 75 74 6d 6f 64 65 5b 69 |reload_o|utmode[i|
|00005500| 5d 3b 0d 09 09 20 20 73 | 69 7a 65 20 3d 20 43 4c |];... s|ize = CL|
|00005510| 41 53 53 5f 4d 41 58 5f | 4e 52 45 47 53 20 28 72 |ASS_MAX_|NREGS (r|
|00005520| 65 6c 6f 61 64 5f 72 65 | 67 5f 63 6c 61 73 73 5b |eload_re|g_class[|
|00005530| 69 5d 2c 20 6d 6f 64 65 | 29 3b 0d 09 09 20 20 69 |i], mode|);... i|
|00005540| 66 20 28 73 69 7a 65 20 | 3e 20 31 29 0d 09 09 20 |f (size |> 1)... |
|00005550| 20 20 20 7b 0d 09 09 20 | 20 20 20 20 20 2f 2a 20 | {... | /* |
|00005560| 43 6f 75 6e 74 20 6e 75 | 6d 62 65 72 20 6f 66 20 |Count nu|mber of |
|00005570| 67 72 6f 75 70 73 20 6e | 65 65 64 65 64 20 73 65 |groups n|eeded se|
|00005580| 70 61 72 61 74 65 6c 79 | 20 66 72 6f 6d 0d 09 09 |parately| from...|
|00005590| 09 20 6e 75 6d 62 65 72 | 20 6f 66 20 69 6e 64 69 |. number| of indi|
|000055a0| 76 69 64 75 61 6c 20 72 | 65 67 73 20 6e 65 65 64 |vidual r|egs need|
|000055b0| 65 64 2e 20 20 2a 2f 0d | 09 09 20 20 20 20 20 20 |ed. */.|.. |
|000055c0| 74 68 69 73 5f 67 72 6f | 75 70 73 5b 28 69 6e 74 |this_gro|ups[(int|
|000055d0| 29 20 72 65 6c 6f 61 64 | 5f 72 65 67 5f 63 6c 61 |) reload|_reg_cla|
|000055e0| 73 73 5b 69 5d 5d 2b 2b | 3b 0d 09 09 20 20 20 20 |ss[i]]++|;... |
|000055f0| 20 20 70 20 3d 20 72 65 | 67 5f 63 6c 61 73 73 5f | p = re|g_class_|
|00005600| 73 75 70 65 72 63 6c 61 | 73 73 65 73 5b 28 69 6e |supercla|sses[(in|
|00005610| 74 29 20 72 65 6c 6f 61 | 64 5f 72 65 67 5f 63 6c |t) reloa|d_reg_cl|
|00005620| 61 73 73 5b 69 5d 5d 3b | 0d 09 09 20 20 20 20 20 |ass[i]];|... |
|00005630| 20 77 68 69 6c 65 20 28 | 2a 70 20 21 3d 20 4c 49 | while (|*p != LI|
|00005640| 4d 5f 52 45 47 5f 43 4c | 41 53 53 45 53 29 0d 09 |M_REG_CL|ASSES)..|
|00005650| 09 09 74 68 69 73 5f 67 | 72 6f 75 70 73 5b 28 69 |..this_g|roups[(i|
|00005660| 6e 74 29 20 2a 70 2b 2b | 5d 2b 2b 3b 0d 09 09 20 |nt) *p++|]++;... |
|00005670| 20 20 20 20 20 28 2a 74 | 68 69 73 5f 74 6f 74 61 | (*t|his_tota|
|00005680| 6c 5f 67 72 6f 75 70 73 | 29 2b 2b 3b 0d 0d 09 09 |l_groups|)++;....|
|00005690| 20 20 20 20 20 20 2f 2a | 20 49 66 20 61 20 67 72 | /*| If a gr|
|000056a0| 6f 75 70 20 6f 66 20 63 | 6f 6e 73 65 63 75 74 69 |oup of c|onsecuti|
|000056b0| 76 65 20 72 65 67 73 20 | 61 72 65 20 6e 65 65 64 |ve regs |are need|
|000056c0| 65 64 2c 0d 09 09 09 20 | 72 65 63 6f 72 64 20 77 |ed,.... |record w|
|000056d0| 68 69 63 68 20 6d 61 63 | 68 69 6e 65 20 6d 6f 64 |hich mac|hine mod|
|000056e0| 65 20 6e 65 65 64 73 20 | 74 68 65 6d 2e 0d 09 09 |e needs |them....|
|000056f0| 09 20 43 72 61 73 68 20 | 69 66 20 74 77 6f 20 64 |. Crash |if two d|
|00005700| 69 73 73 69 6d 69 6c 61 | 72 20 6d 61 63 68 69 6e |issimila|r machin|
|00005710| 65 20 6d 6f 64 65 73 20 | 62 6f 74 68 20 6e 65 65 |e modes |both nee|
|00005720| 64 0d 09 09 09 20 67 72 | 6f 75 70 73 20 6f 66 20 |d.... gr|oups of |
|00005730| 63 6f 6e 73 65 63 75 74 | 69 76 65 20 72 65 67 73 |consecut|ive regs|
|00005740| 20 6f 66 20 74 68 65 20 | 73 61 6d 65 20 63 6c 61 | of the |same cla|
|00005750| 73 73 2e 20 20 2a 2f 0d | 0d 09 09 20 20 20 20 20 |ss. */.|... |
|00005760| 20 69 66 20 28 67 72 6f | 75 70 5f 6d 6f 64 65 5b | if (gro|up_mode[|
|00005770| 28 69 6e 74 29 20 72 65 | 6c 6f 61 64 5f 72 65 67 |(int) re|load_reg|
|00005780| 5f 63 6c 61 73 73 5b 69 | 5d 5d 20 21 3d 20 56 4f |_class[i|]] != VO|
|00005790| 49 44 6d 6f 64 65 0d 09 | 09 09 20 20 26 26 0d 09 |IDmode..|.. &&..|
|000057a0| 09 09 20 20 28 21 20 6d | 6f 64 65 73 5f 65 71 75 |.. (! m|odes_equ|
|000057b0| 69 76 5f 66 6f 72 5f 63 | 6c 61 73 73 5f 70 20 28 |iv_for_c|lass_p (|
|000057c0| 67 72 6f 75 70 5f 6d 6f | 64 65 5b 28 69 6e 74 29 |group_mo|de[(int)|
|000057d0| 20 72 65 6c 6f 61 64 5f | 72 65 67 5f 63 6c 61 73 | reload_|reg_clas|
|000057e0| 73 5b 69 5d 5d 2c 20 6d | 6f 64 65 2c 20 72 65 6c |s[i]], m|ode, rel|
|000057f0| 6f 61 64 5f 72 65 67 5f | 63 6c 61 73 73 5b 69 5d |oad_reg_|class[i]|
|00005800| 29 0d 09 09 09 20 20 20 | 7c 7c 0d 09 09 09 20 20 |).... |||.... |
|00005810| 20 67 72 6f 75 70 5f 73 | 69 7a 65 5b 28 69 6e 74 | group_s|ize[(int|
|00005820| 29 20 72 65 6c 6f 61 64 | 5f 72 65 67 5f 63 6c 61 |) reload|_reg_cla|
|00005830| 73 73 5b 69 5d 5d 20 21 | 3d 20 73 69 7a 65 29 29 |ss[i]] !|= size))|
|00005840| 0d 09 09 09 20 20 20 7b | 0d 09 09 09 20 20 20 66 |.... {|.... f|
|00005850| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|00005860| 25 73 5c 6e 22 2c 20 47 | 45 54 5f 4d 4f 44 45 5f |%s\n", G|ET_MODE_|
|00005870| 4e 41 4d 45 28 67 72 6f | 75 70 5f 6d 6f 64 65 5b |NAME(gro|up_mode[|
|00005880| 28 69 6e 74 29 20 72 65 | 6c 6f 61 64 5f 72 65 67 |(int) re|load_reg|
|00005890| 5f 63 6c 61 73 73 5b 69 | 5d 5d 29 29 3b 0d 09 09 |_class[i|]]));...|
|000058a0| 09 20 20 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 |. fpri|ntf(stde|
|000058b0| 72 72 2c 20 22 25 73 5c | 6e 22 2c 09 47 45 54 5f |rr, "%s\|n",.GET_|
|000058c0| 4d 4f 44 45 5f 4e 41 4d | 45 28 6d 6f 64 65 29 29 |MODE_NAM|E(mode))|
|000058d0| 3b 0d 09 09 09 20 20 20 | 66 70 72 69 6e 74 66 28 |;.... |fprintf(|
|000058e0| 73 74 64 65 72 72 2c 20 | 22 25 64 5c 6e 22 2c 20 |stderr, |"%d\n", |
|000058f0| 72 65 6c 6f 61 64 5f 72 | 65 67 5f 63 6c 61 73 73 |reload_r|eg_class|
|00005900| 5b 69 5d 29 3b 0d 09 09 | 09 61 62 6f 72 74 20 28 |[i]);...|.abort (|
|00005910| 29 3b 0d 09 09 09 09 7d | 0d 0d 09 09 20 20 20 20 |);.....}|.... |
|00005920| 20 20 2f 2a 20 52 65 63 | 6f 72 64 20 73 69 7a 65 | /* Rec|ord size|
|00005930| 20 61 6e 64 20 6d 6f 64 | 65 20 6f 66 20 61 20 67 | and mod|e of a g|
|00005940| 72 6f 75 70 20 6f 66 20 | 74 68 69 73 20 63 6c 61 |roup of |this cla|
|00005950| 73 73 2e 20 20 2a 2f 0d | 09 09 20 20 20 20 20 20 |ss. */.|.. |
|00005960| 67 72 6f 75 70 5f 73 69 | 7a 65 5b 28 69 6e 74 29 |group_si|ze[(int)|
|00005970| 20 72 65 6c 6f 61 64 5f | 72 65 67 5f 63 6c 61 73 | reload_|reg_clas|
|00005980| 73 5b 69 5d 5d 20 3d 20 | 73 69 7a 65 3b 0d 09 09 |s[i]] = |size;...|
|00005990| 20 20 20 20 20 20 67 72 | 6f 75 70 5f 6d 6f 64 65 | gr|oup_mode|
|000059a0| 5b 28 69 6e 74 29 20 72 | 65 6c 6f 61 64 5f 72 65 |[(int) r|eload_re|
|000059b0| 67 5f 63 6c 61 73 73 5b | 69 5d 5d 20 3d 20 6d 6f |g_class[|i]] = mo|
|000059c0| 64 65 3b 0d 09 09 20 20 | 20 20 7d 0d 09 09 20 20 |de;... | }... |
|000059d0| 65 6c 73 65 20 69 66 20 | 28 73 69 7a 65 20 3d 3d |else if |(size ==|
|000059e0| 20 31 29 0d 09 09 20 20 | 20 20 7b 0d 09 09 20 20 | 1)... | {... |
|000059f0| 20 20 20 20 74 68 69 73 | 5f 6e 65 65 64 73 5b 28 | this|_needs[(|
|00005a00| 69 6e 74 29 20 72 65 6c | 6f 61 64 5f 72 65 67 5f |int) rel|oad_reg_|
|00005a10| 63 6c 61 73 73 5b 69 5d | 5d 20 2b 3d 20 31 3b 0d |class[i]|] += 1;.|
|00005a20| 09 09 20 20 20 20 20 20 | 70 20 3d 20 72 65 67 5f |.. |p = reg_|
|00005a30| 63 6c 61 73 73 5f 73 75 | 70 65 72 63 6c 61 73 73 |class_su|perclass|
|00005a40| 65 73 5b 28 69 6e 74 29 | 20 72 65 6c 6f 61 64 5f |es[(int)| reload_|
|00005a50| 72 65 67 5f 63 6c 61 73 | 73 5b 69 5d 5d 3b 0d 09 |reg_clas|s[i]];..|
|00005a60| 09 20 20 20 20 20 20 77 | 68 69 6c 65 20 28 2a 70 |. w|hile (*p|
|00005a70| 20 21 3d 20 4c 49 4d 5f | 52 45 47 5f 43 4c 41 53 | != LIM_|REG_CLAS|
|00005a80| 53 45 53 29 0d 09 09 09 | 74 68 69 73 5f 6e 65 65 |SES)....|this_nee|
|00005a90| 64 73 5b 28 69 6e 74 29 | 20 2a 70 2b 2b 5d 20 2b |ds[(int)| *p++] +|
|00005aa0| 3d 20 31 3b 0d 09 09 20 | 20 20 20 7d 0d 09 09 20 |= 1;... | }... |
|00005ab0| 20 65 6c 73 65 0d 09 09 | 20 20 20 20 61 62 6f 72 | else...| abor|
|00005ac0| 74 20 28 29 3b 0d 0d 09 | 09 20 20 69 66 20 28 67 |t ();...|. if (g|
|00005ad0| 6c 6f 62 61 6c 29 0d 09 | 09 20 20 20 20 7b 0d 09 |lobal)..|. {..|
|00005ae0| 09 20 20 20 20 20 20 69 | 66 20 28 21 20 62 61 73 |. i|f (! bas|
|00005af0| 69 63 5f 62 6c 6f 63 6b | 5f 6e 65 65 64 73 5b 74 |ic_block|_needs[t|
|00005b00| 68 69 73 5f 62 6c 6f 63 | 6b 5d 29 0d 09 09 09 6e |his_bloc|k])....n|
|00005b10| 65 77 5f 62 61 73 69 63 | 5f 62 6c 6f 63 6b 5f 6e |ew_basic|_block_n|
|00005b20| 65 65 64 73 20 3d 20 31 | 3b 0d 09 09 20 20 20 20 |eeds = 1|;... |
|00005b30| 20 20 62 61 73 69 63 5f | 62 6c 6f 63 6b 5f 6e 65 | basic_|block_ne|
|00005b40| 65 64 73 5b 74 68 69 73 | 5f 62 6c 6f 63 6b 5d 20 |eds[this|_block] |
|00005b50| 3d 20 31 3b 0d 09 09 20 | 20 20 20 7d 0d 09 09 7d |= 1;... | }...}|
|00005b60| 0d 0d 09 20 20 20 20 20 | 20 2f 2a 20 41 6c 6c 20 |... | /* All |
|00005b70| 72 65 6c 6f 61 64 73 20 | 68 61 76 65 20 62 65 65 |reloads |have bee|
|00005b80| 6e 20 63 6f 75 6e 74 65 | 64 20 66 6f 72 20 74 68 |n counte|d for th|
|00005b90| 69 73 20 69 6e 73 6e 3b | 0d 09 09 20 6e 6f 77 20 |is insn;|... now |
|00005ba0| 6d 65 72 67 65 20 74 68 | 65 20 76 61 72 69 6f 75 |merge th|e variou|
|00005bb0| 73 20 74 69 6d 65 73 20 | 6f 66 20 75 73 65 2e 0d |s times |of use..|
|00005bc0| 09 09 20 54 68 69 73 20 | 73 65 74 73 20 69 6e 73 |.. This |sets ins|
|00005bd0| 6e 5f 6e 65 65 64 73 2c | 20 65 74 63 2e 2c 20 74 |n_needs,| etc., t|
|00005be0| 6f 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 74 6f |o the ma|ximum to|
|00005bf0| 74 61 6c 20 6e 75 6d 62 | 65 72 0d 09 09 20 6f 66 |tal numb|er... of|
|00005c00| 20 72 65 67 69 73 74 65 | 72 73 20 6e 65 65 64 65 | registe|rs neede|
|00005c10| 64 20 61 74 20 61 6e 79 | 20 70 6f 69 6e 74 20 69 |d at any| point i|
|00005c20| 6e 20 74 68 69 73 20 69 | 6e 73 6e 2e 20 20 2a 2f |n this i|nsn. */|
|00005c30| 0d 0d 09 20 20 20 20 20 | 20 66 6f 72 20 28 69 20 |... | for (i |
|00005c40| 3d 20 30 3b 20 69 20 3c | 20 4e 5f 52 45 47 5f 43 |= 0; i <| N_REG_C|
|00005c50| 4c 41 53 53 45 53 3b 20 | 69 2b 2b 29 0d 09 09 7b |LASSES; |i++)...{|
|00005c60| 0d 09 09 20 20 69 6e 74 | 20 74 68 69 73 5f 6d 61 |... int| this_ma|
|00005c70| 78 3b 0d 09 09 20 20 74 | 68 69 73 5f 6d 61 78 20 |x;... t|his_max |
|00005c80| 3d 20 69 6e 73 6e 5f 6e | 65 65 64 73 5f 66 6f 72 |= insn_n|eeds_for|
|00005c90| 5f 69 6e 70 75 74 73 5b | 69 5d 3b 0d 09 09 20 20 |_inputs[|i];... |
|00005ca0| 69 66 20 28 69 6e 73 6e | 5f 6e 65 65 64 73 5f 66 |if (insn|_needs_f|
|00005cb0| 6f 72 5f 6f 75 74 70 75 | 74 73 5b 69 5d 20 3e 20 |or_outpu|ts[i] > |
|00005cc0| 74 68 69 73 5f 6d 61 78 | 29 0d 09 09 20 20 20 20 |this_max|)... |
|00005cd0| 74 68 69 73 5f 6d 61 78 | 20 3d 20 69 6e 73 6e 5f |this_max| = insn_|
|00005ce0| 6e 65 65 64 73 5f 66 6f | 72 5f 6f 75 74 70 75 74 |needs_fo|r_output|
|00005cf0| 73 5b 69 5d 3b 0d 09 09 | 20 20 69 66 20 28 69 6e |s[i];...| if (in|
|00005d00| 73 6e 5f 6e 65 65 64 73 | 5f 66 6f 72 5f 6f 70 65 |sn_needs|_for_ope|
|00005d10| 72 61 6e 64 73 5b 69 5d | 20 3e 20 74 68 69 73 5f |rands[i]| > this_|
|00005d20| 6d 61 78 29 0d 09 09 20 | 20 20 20 74 68 69 73 5f |max)... | this_|
|00005d30| 6d 61 78 20 3d 20 69 6e | 73 6e 5f 6e 65 65 64 73 |max = in|sn_needs|
|00005d40| 5f 66 6f 72 5f 6f 70 65 | 72 61 6e 64 73 5b 69 5d |_for_ope|rands[i]|
|00005d50| 3b 0d 09 09 20 20 69 6e | 73 6e 5f 6e 65 65 64 73 |;... in|sn_needs|
|00005d60| 5b 69 5d 20 2b 3d 20 74 | 68 69 73 5f 6d 61 78 3b |[i] += t|his_max;|
|00005d70| 0d 09 09 20 20 74 68 69 | 73 5f 6d 61 78 20 3d 20 |... thi|s_max = |
|00005d80| 69 6e 73 6e 5f 67 72 6f | 75 70 73 5f 66 6f 72 5f |insn_gro|ups_for_|
|00005d90| 69 6e 70 75 74 73 5b 69 | 5d 3b 0d 09 09 20 20 69 |inputs[i|];... i|
|00005da0| 66 20 28 69 6e 73 6e 5f | 67 72 6f 75 70 73 5f 66 |f (insn_|groups_f|
|00005db0| 6f 72 5f 6f 75 74 70 75 | 74 73 5b 69 5d 20 3e 20 |or_outpu|ts[i] > |
|00005dc0| 74 68 69 73 5f 6d 61 78 | 29 0d 09 09 20 20 20 20 |this_max|)... |
|00005dd0| 74 68 69 73 5f 6d 61 78 | 20 3d 20 69 6e 73 6e 5f |this_max| = insn_|
|00005de0| 67 72 6f 75 70 73 5f 66 | 6f 72 5f 6f 75 74 70 75 |groups_f|or_outpu|
|00005df0| 74 73 5b 69 5d 3b 0d 09 | 09 20 20 69 66 20 28 69 |ts[i];..|. if (i|
|00005e00| 6e 73 6e 5f 67 72 6f 75 | 70 73 5f 66 6f 72 5f 6f |nsn_grou|ps_for_o|
|00005e10| 70 65 72 61 6e 64 73 5b | 69 5d 20 3e 20 74 68 69 |perands[|i] > thi|
|00005e20| 73 5f 6d 61 78 29 0d 09 | 09 20 20 20 20 74 68 69 |s_max)..|. thi|
|00005e30| 73 5f 6d 61 78 20 3d 20 | 69 6e 73 6e 5f 67 72 6f |s_max = |insn_gro|
|00005e40| 75 70 73 5f 66 6f 72 5f | 6f 70 65 72 61 6e 64 73 |ups_for_|operands|
|00005e50| 5b 69 5d 3b 0d 09 09 20 | 20 69 6e 73 6e 5f 67 72 |[i];... | insn_gr|
|00005e60| 6f 75 70 73 5b 69 5d 20 | 2b 3d 20 74 68 69 73 5f |oups[i] |+= this_|
|00005e70| 6d 61 78 3b 0d 09 09 7d | 0d 09 20 20 20 20 20 20 |max;...}|.. |
|00005e80| 69 6e 73 6e 5f 74 6f 74 | 61 6c 5f 67 72 6f 75 70 |insn_tot|al_group|
|00005e90| 73 20 2b 3d 20 6d 61 78 | 20 28 69 6e 73 6e 5f 74 |s += max| (insn_t|
|00005ea0| 6f 74 61 6c 5f 67 72 6f | 75 70 73 5f 66 6f 72 5f |otal_gro|ups_for_|
|00005eb0| 69 6e 70 75 74 73 2c 0d | 09 09 09 09 09 6d 61 78 |inputs,.|.....max|
|00005ec0| 20 28 69 6e 73 6e 5f 74 | 6f 74 61 6c 5f 67 72 6f | (insn_t|otal_gro|
|00005ed0| 75 70 73 5f 66 6f 72 5f | 6f 75 74 70 75 74 73 2c |ups_for_|outputs,|
|00005ee0| 0d 09 09 09 09 09 20 20 | 20 20 20 69 6e 73 6e 5f |...... | insn_|
|00005ef0| 74 6f 74 61 6c 5f 67 72 | 6f 75 70 73 5f 66 6f 72 |total_gr|oups_for|
|00005f00| 5f 6f 70 65 72 61 6e 64 | 73 29 29 3b 0d 0d 09 20 |_operand|s));... |
|00005f10| 20 20 20 20 20 2f 2a 20 | 52 65 6d 65 6d 62 65 72 | /* |Remember|
|00005f20| 20 66 6f 72 20 6c 61 74 | 65 72 20 73 68 6f 72 74 | for lat|er short|
|00005f30| 63 75 74 73 20 77 68 69 | 63 68 20 69 6e 73 6e 73 |cuts whi|ch insns|
|00005f40| 20 68 61 64 20 61 6e 79 | 20 72 65 6c 6f 61 64 73 | had any| reloads|
|00005f50| 2e 20 20 2a 2f 0d 0d 09 | 20 20 20 20 20 20 50 55 |. */...| PU|
|00005f60| 54 5f 4d 4f 44 45 20 28 | 69 6e 73 6e 2c 20 6e 5f |T_MODE (|insn, n_|
|00005f70| 72 65 6c 6f 61 64 73 20 | 3f 20 51 49 6d 6f 64 65 |reloads |? QImode|
|00005f80| 20 3a 20 56 4f 49 44 6d | 6f 64 65 29 3b 0d 0d 09 | : VOIDm|ode);...|
|00005f90| 20 20 20 20 20 20 2f 2a | 20 46 6f 72 20 65 61 63 | /*| For eac|
|00005fa0| 68 20 63 6c 61 73 73 2c | 20 63 6f 6c 6c 65 63 74 |h class,| collect|
|00005fb0| 20 6d 61 78 69 6d 75 6d | 20 6e 65 65 64 20 6f 66 | maximum| need of|
|00005fc0| 20 61 6e 79 20 69 6e 73 | 6e 2e 20 20 2a 2f 0d 0d | any ins|n. */..|
|00005fd0| 09 20 20 20 20 20 20 66 | 6f 72 20 28 69 20 3d 20 |. f|or (i = |
|00005fe0| 30 3b 20 69 20 3c 20 4e | 5f 52 45 47 5f 43 4c 41 |0; i < N|_REG_CLA|
|00005ff0| 53 53 45 53 3b 20 69 2b | 2b 29 0d 09 09 7b 0d 09 |SSES; i+|+)...{..|
|00006000| 09 20 20 69 66 20 28 6d | 61 78 5f 6e 65 65 64 73 |. if (m|ax_needs|
|00006010| 5b 69 5d 20 3c 20 69 6e | 73 6e 5f 6e 65 65 64 73 |[i] < in|sn_needs|
|00006020| 5b 69 5d 29 0d 09 09 20 | 20 20 20 6d 61 78 5f 6e |[i])... | max_n|
|00006030| 65 65 64 73 5b 69 5d 20 | 3d 20 69 6e 73 6e 5f 6e |eeds[i] |= insn_n|
|00006040| 65 65 64 73 5b 69 5d 3b | 0d 09 09 20 20 69 66 20 |eeds[i];|... if |
|00006050| 28 6d 61 78 5f 67 72 6f | 75 70 73 5b 69 5d 20 3c |(max_gro|ups[i] <|
|00006060| 20 69 6e 73 6e 5f 67 72 | 6f 75 70 73 5b 69 5d 29 | insn_gr|oups[i])|
|00006070| 0d 09 09 20 20 20 20 6d | 61 78 5f 67 72 6f 75 70 |... m|ax_group|
|00006080| 73 5b 69 5d 20 3d 20 69 | 6e 73 6e 5f 67 72 6f 75 |s[i] = i|nsn_grou|
|00006090| 70 73 5b 69 5d 3b 0d 09 | 09 20 20 69 66 20 28 69 |ps[i];..|. if (i|
|000060a0| 6e 73 6e 5f 74 6f 74 61 | 6c 5f 67 72 6f 75 70 73 |nsn_tota|l_groups|
|000060b0| 20 3e 20 30 29 0d 09 09 | 20 20 20 20 69 66 20 28 | > 0)...| if (|
|000060c0| 6d 61 78 5f 6e 6f 6e 67 | 72 6f 75 70 73 5b 69 5d |max_nong|roups[i]|
|000060d0| 20 3c 20 69 6e 73 6e 5f | 6e 65 65 64 73 5b 69 5d | < insn_|needs[i]|
|000060e0| 29 0d 09 09 20 20 20 20 | 20 20 6d 61 78 5f 6e 6f |)... | max_no|
|000060f0| 6e 67 72 6f 75 70 73 5b | 69 5d 20 3d 20 69 6e 73 |ngroups[|i] = ins|
|00006100| 6e 5f 6e 65 65 64 73 5b | 69 5d 3b 0d 09 09 7d 0d |n_needs[|i];...}.|
|00006110| 09 20 20 20 20 7d 0d 09 | 20 20 2f 2a 20 4e 6f 74 |. }..| /* Not|
|00006120| 65 20 74 68 61 74 20 74 | 68 65 72 65 20 69 73 20 |e that t|here is |
|00006130| 61 20 63 6f 6e 74 69 6e | 75 65 20 73 74 61 74 65 |a contin|ue state|
|00006140| 6d 65 6e 74 20 61 62 6f | 76 65 2e 20 20 2a 2f 0d |ment abo|ve. */.|
|00006150| 09 7d 0d 0d 20 20 20 20 | 20 20 2f 2a 20 4e 6f 77 |.}.. | /* Now|
|00006160| 20 64 65 64 75 63 74 20 | 66 72 6f 6d 20 74 68 65 | deduct |from the|
|00006170| 20 6e 65 65 64 73 20 66 | 6f 72 20 74 68 65 20 72 | needs f|or the r|
|00006180| 65 67 69 73 74 65 72 73 | 20 61 6c 72 65 61 64 79 |egisters| already|
|00006190| 0d 09 20 61 76 61 69 6c | 61 62 6c 65 20 28 61 6c |.. avail|able (al|
|000061a0| 72 65 61 64 79 20 73 70 | 69 6c 6c 65 64 29 2e 20 |ready sp|illed). |
|000061b0| 20 2a 2f 0d 0d 20 20 20 | 20 20 20 62 7a 65 72 6f | */.. | bzero|
|000061c0| 20 28 63 6f 75 6e 74 65 | 64 5f 66 6f 72 5f 67 72 | (counte|d_for_gr|
|000061d0| 6f 75 70 73 2c 20 73 69 | 7a 65 6f 66 20 63 6f 75 |oups, si|zeof cou|
|000061e0| 6e 74 65 64 5f 66 6f 72 | 5f 67 72 6f 75 70 73 29 |nted_for|_groups)|
|000061f0| 3b 0d 20 20 20 20 20 20 | 62 7a 65 72 6f 20 28 63 |;. |bzero (c|
|00006200| 6f 75 6e 74 65 64 5f 66 | 6f 72 5f 6e 6f 6e 67 72 |ounted_f|or_nongr|
|00006210| 6f 75 70 73 2c 20 73 69 | 7a 65 6f 66 20 63 6f 75 |oups, si|zeof cou|
|00006220| 6e 74 65 64 5f 66 6f 72 | 5f 6e 6f 6e 67 72 6f 75 |nted_for|_nongrou|
|00006230| 70 73 29 3b 0d 0d 20 20 | 20 20 20 20 2f 2a 20 46 |ps);.. | /* F|
|00006240| 69 6e 64 20 61 6c 6c 20 | 63 6f 6e 73 65 63 75 74 |ind all |consecut|
|00006250| 69 76 65 20 67 72 6f 75 | 70 73 20 6f 66 20 73 70 |ive grou|ps of sp|
|00006260| 69 6c 6c 65 64 20 72 65 | 67 69 73 74 65 72 73 0d |illed re|gisters.|
|00006270| 09 20 61 6e 64 20 6d 61 | 72 6b 20 65 61 63 68 20 |. and ma|rk each |
|00006280| 67 72 6f 75 70 20 6f 66 | 66 20 61 67 61 69 6e 73 |group of|f agains|
|00006290| 74 20 74 68 65 20 6e 65 | 65 64 20 66 6f 72 20 73 |t the ne|ed for s|
|000062a0| 75 63 68 20 67 72 6f 75 | 70 73 2e 20 20 2a 2f 0d |uch grou|ps. */.|
|000062b0| 0d 20 20 20 20 20 20 66 | 6f 72 20 28 69 20 3d 20 |. f|or (i = |
|000062c0| 30 3b 20 69 20 3c 20 4e | 5f 52 45 47 5f 43 4c 41 |0; i < N|_REG_CLA|
|000062d0| 53 53 45 53 3b 20 69 2b | 2b 29 0d 09 69 66 20 28 |SSES; i+|+)..if (|
|000062e0| 67 72 6f 75 70 5f 73 69 | 7a 65 5b 69 5d 20 3e 20 |group_si|ze[i] > |
|000062f0| 31 29 0d 09 20 20 7b 0d | 09 20 20 20 20 63 68 61 |1).. {.|. cha|
|00006300| 72 20 72 65 67 6d 61 73 | 6b 5b 46 49 52 53 54 5f |r regmas|k[FIRST_|
|00006310| 50 53 45 55 44 4f 5f 52 | 45 47 49 53 54 45 52 5d |PSEUDO_R|EGISTER]|
|00006320| 3b 0d 09 20 20 20 20 69 | 6e 74 20 6a 3b 0d 0d 09 |;.. i|nt j;...|
|00006330| 20 20 20 20 62 7a 65 72 | 6f 20 28 72 65 67 6d 61 | bzer|o (regma|
|00006340| 73 6b 2c 20 73 69 7a 65 | 6f 66 20 72 65 67 6d 61 |sk, size|of regma|
|00006350| 73 6b 29 3b 0d 09 20 20 | 20 20 2f 2a 20 4d 61 6b |sk);.. | /* Mak|
|00006360| 65 20 61 20 6d 61 73 6b | 20 6f 66 20 61 6c 6c 20 |e a mask| of all |
|00006370| 74 68 65 20 72 65 67 73 | 20 74 68 61 74 20 61 72 |the regs| that ar|
|00006380| 65 20 73 70 69 6c 6c 20 | 72 65 67 73 20 69 6e 20 |e spill |regs in |
|00006390| 63 6c 61 73 73 20 49 2e | 20 20 2a 2f 0d 09 20 20 |class I.| */.. |
|000063a0| 20 20 66 6f 72 20 28 6a | 20 3d 20 30 3b 20 6a 20 | for (j| = 0; j |
|000063b0| 3c 20 6e 5f 73 70 69 6c | 6c 73 3b 20 6a 2b 2b 29 |< n_spil|ls; j++)|
|000063c0| 0d 09 20 20 20 20 20 20 | 69 66 20 28 54 45 53 54 |.. |if (TEST|
|000063d0| 5f 48 41 52 44 5f 52 45 | 47 5f 42 49 54 20 28 72 |_HARD_RE|G_BIT (r|
|000063e0| 65 67 5f 63 6c 61 73 73 | 5f 63 6f 6e 74 65 6e 74 |eg_class|_content|
|000063f0| 73 5b 69 5d 2c 20 73 70 | 69 6c 6c 5f 72 65 67 73 |s[i], sp|ill_regs|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.